You can use the MYSQL command line to implement many functions. The MYSQL command line described below is used to connect to the MYSQL database. If you have encountered any problems in this regard, take a look.
Format: mysql-h host address-u user name-p User Password
Or: mysql-u username-p // press enter and enter the password. The password is invisible.
1. Connect to the MYSQL command line on the local machine
First, open the DOS window, enter the mysql \ bin directory, type the mysql-u root-p command, and press enter to prompt you to enter the password. note that there can be spaces or spaces before the user name, but if-p is followed by the user password, there must be no space between-p and the password; otherwise, you will be asked to re-enter the password. for example, the following are valid logon attempts: (account: root Password: 123)
Mysql-u root-p
Mysql-uroot-p
Mysql-uroot-p123
If you have just installed MYSQL, the Super User root has no password, so press enter to enter MYSQL. The MYSQL prompt is: mysql>
2. Connect to the MYSQL command line on the remote host
Assume that the IP address of the remote host is 110.110.110.110, the user name is root, and the password is abcd123. Enter the following command:
Mysql-h110.110.110.110-u root-p 123; Note: Do not add spaces between u and root. The same applies to others)
3. exit MYSQL command: exit and press Enter)
MySQL permission table Introduction
Commands that grant MySQL user permissions
How to optimize mysql Indexes
How to view MySQL Indexes
Use of MySQL EXPLAIN statements