1. Create a database: create Database databaseName; For example, if you need to create a mysqlTest database, create Database mysqlTest;
## by It can also be seen that the name here is not case-sensitive. As far as I know, it can be set to all uppercase or all lowercase through the settings.
2. View existing databases in the system: show databases;
3. Select a database: use databaseName;(all databaseName in this article Both are a code name, representing the database name, tableName is also a code name, representing the table name);
4. Delete the database: drop database databaseName;
5. View database engine: show engines \G
Support There are many engines, so the screenshots here are incomplete.
6. View the database default storage engine: show variables like 'storage_engine%';
##7 , View system help: help contents;
8. Create table: create table tableName(
Attribute name data type,
Attribute name data type,
......
)
9. View the table structure: describe tableName;
10. Delete table: drop table tableName;
The above is the content of the common basic operation syntax of mysql (1)~~Operation of the library [command line mode]. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!