Start: Net start MySQL;
Enter: mysql-u root-P/MySQL-H localhost-u root-P databasename;
List databases: Show databases;
Select Database: Use databasename;
List tables: show tables;
Show columns from tablename;
Create a database: Source filename.txt;
Matching character: wildcard _ can be used to represent any character, and % represents any string;
Add a field: alter table tabelname add column fieldname datetype;
Add multiple fields: alter table tabelname add column fieldname1 datetype, add columns fieldname2 datetype;
Multi-line command input: note that words cannot be broken; when data is inserted or changed, the field strings cannot be expanded into multiple rows; otherwise, the hard press enter will be stored in the data;
Add an Administrator Account: grant all on *. * to user @ localhost identified by "password ";
After each statement is entered, enter the plus sign ';' At the end, or add '\ G;
Query time: select now ();
Query the current user: Select User ();
Query the database version: Select version ();
Query the currently used database: select database ();