1. Connect to MySQL Database
If you configure an environment variable to run directly, if you do not configure the environment variable you need to run under the installation directory ... \ bin, cmd---mysql-u root-p, and then enter the password;
Or you can run cmd---Mysql-u root-p123, especially note that between you and root can have spaces or not, but there must be no space between-P and 123
2. View all the database
mysql-> show databases; Special attention to the databases can not be misspelled, after you must enter ";" then press ENTER, a statement or command at the end of the best input ";"
3.
connect to MySQL on the remote host.
Assume the remote host IP is: 110.110.110.110, the user name is root, the password is abcd123. Type the following command:
Mysql-h110.110.110.110-u Root-p 123; (Note: You can not add a space between the root and the other)
4.
quit MySQL Command: Exit (Enter)
5. Select Database
After show databases, you can select a database you want to manipulate and use the command databasename,databasename instead of the actual database name.
6. View all the tables in the selected database
After you select database, you can use show tables to view all the table
7. View Table Structure
Desc TableName
8. Other operations on the table are like ordinary SQL statements, which are not described in detail here first
Mysql Common Commands and considerations