1. View all current databases
show databases;
2. Open the specified library use library name
3. View all tables of the current library
show tables;
4. View All tables in other libraries
show tables from 库名;
5. Create table
create table 表名( 列名 列类型, 列名 列类型, 。。。 );
6. View table structure
desc 表名;
7. View server version
Method 1: Log in to the mysql server select version();
Method 2: Not logged in to the mysql server mysql --version or mysql --V
The above is the detailed content of Example analysis of common MySQL commands. For more information, please follow other related articles on the PHP Chinese website!