Mysql basic, mysql
Mysql-u root-pEnter the password to enter the databaseShow database;Query Current DatabaseUse databasenameSwitch to a databaseShow tables;List the tables of the current databaseDesc tbalenameList table fieldsSelect user ()+ ---------------- +| User () |+ ---------------- +| Root @ localhost |+ ---------------- +View the current userSelect database () + ------------ +| Database () |+ ------------ +| Ylg |+ ------------ +View the database currently usedCreate database db1;Create a database named db1Create table t1 ('id' int (4), 'name' char (40 ))Create Table t1 and enclose the fields in backquotes!Show statusView the current MYsql statusShow variablesView Mysql ParametersShow variables like 'max _ connect %'View a parameter. % is similar to omnipotent match.Set global max_connect_errors = 1000;Modify the parameter. The global parameter specifies the parameter name to be modified. set global can be modified temporarily and will expire after restart.Show processlistView the current server QueueGrant all on *. * to user1 identified by 'root'Create and authorize user1 and set the password.Insert into t1 values (1, 'abc ');Insert data into a tableUpdate t1 set name = 'aaa' where id = 1;Modify Table DataTruncate table t1Clear table data, but not deleteDrop table t1;Delete tableDrop database db1;Delete Database