Login:
Mysql-h server address-u login name-P Port-p password
(It is best to login without entering the password, wait for the next prompt to come out and then lose, so you can hide the password in the interface)
Exit:
Quit or exit
Note: After logging into the database system, you need to use "Set names encoded name;" To set the "environment variable" that is currently connected to the database, which is the encoding of the "client" itself that is currently dealing with the database. Generally speaking:
~cmd is fixed in the client using GBK encoding;
~ and PHP page, is the encoding of the page file (now mainstream is utf-8)
Backup:
Mysqldump-h server address-u login name-P port-p to back up the database name > file to be saved as
(such as: Mysql-hlocalhost-uroot-p db1 > C:/database/1.sql)
Recovery:
Recovering data from backup to another database
(such as: Mysql-hlocalhost-uroot-p DB2 < C:/database/1.sql)
MySQL Database common commands