Put mysql.exe in the binary directory under mysqldirectory under c: \ windows. You can run the following command:
Connection: mysql-H host address-u user name-P User Password (Note: U and root do not need to add spaces, the same is true for others)
Disconnected: exit (Press ENTER)
Create authorization: grant select on database. * To username @ login host identified by \ "password \"
Change Password: mysqladmin-u username-P old Password New Password
Delete authorization: revoke select, insert, update, delete om *. * From Test2 @ localhost;
Display Database: Show databases;
Show table: show tables;
Display table structure: Describe table name;
Database creation: Create Database database name;
Delete Database: drop database database name;
Database used: Use Database Name;
Create Table: Create Table Name (field setting list );
Delete table: Drop table name;
Alter table T1 rename T2
Query table: Select * from table name;
Clear table: delete from table name;
Backup table: mysqlbinmysqldump-H (IP)-uroot-P (password) databasename tablename> tablename. SQL
Restore table: mysqlbinmysql-H (IP)-uroot-P (password) databasename tablename <tablename. SQL (delete the original table before the operation)
Add column: alter table T2 add c int unsigned not null auto_increment, add index (C );
Alter column: alter table T2 modify a tinyint not null, change B C char (20 );
Delete column: alter table T2 drop column C;
Backup Database: MySQL \ bin \ mysqldump-H (IP)-uroot-P (password) databasename> database. SQL
Recover Database: MySQL \ bin \ mysql-H (IP)-uroot-P (password) databasename <database. SQL
Copy Database: MySQL \ bin \ mysqldump -- all-databases> all-databases. SQL
Fix the database: mysqlcheck-a-o-uroot-p54safer
Text Data Import: load data local infile \ "file name \" into Table table name;
Data Import and Export: MySQL \ bin \ mysqlimport database tables.txt