What is the command for mysql to create and open a database:
1. Create a database
//Create a database and set it up Good encoding format
create DATABASE mydb character set utf8;
//Modify the encoding format of the created database or database table
alter database mydb character set utf8; alter table t_name convert to character set utf8;
2. Open the newly created database
use 数据库名;
Recommended tutorial: "mysql tutorial》
The above is the detailed content of What is the command to create and open a database in mysql?. For more information, please follow other related articles on the PHP Chinese website!