1.mysql is an open-source relational database management system.
2.mysql Login/exit: MySQL parameter: mysql-u root-p-p3306-h127.0.0.1
3.mysql Landing some parameters meaning:-u: User name,-P: User password,-P: Server port number,-H: Server address-D: Specify the name of the database to open
4.mysql exit three kinds of commands: exit;,quit;,\q;
5. How to modify the MySQL prompt: mysql-uroot-p password depends on the situation--prompt. The second method is: When you enter MySQL, you can enter prompt directly and add the prompt you want to change.
6.mysql prompt type: \d: Represents the full date \d: Represents the current database \h: Name of the server \u: Current user
7.mysql common commands and Syntax rules: SELECT version ();: Displays the current server versions. SELECT Now (): Displays the current date time. SELECT user ();: Show Current user
Syntax specification: the keyword and function name are all capitalized. Database name, table name, field name all lowercase. The SQL statement must end with a semicolon.
8. A semicolon is a terminator.
9. Creating the database: Create databases db_name; Show all databases: show DATABASES; Displays the encoding of the database: show CREATE database db_name; Displays the warning information for the databases: show WARNINGS;
10. How to modify the database encoding method when creating the database: Create DB IF not EXISTS db_name CHARACTER SET encoding method;
11. Delete databases: drop database db_name;
MySQL basic operation and Syntax specification