How to connect to mysql under window: First press the shortcut key [win R] to enter run, and enter cmd; then type the command [mysql -u root -p], and press Enter directly to enter MYSQL middle.
How to connect to mysql under window:
1. Connect to MYSQL on this machine:
1. Press the shortcut key win R to enter run, enter cmd, and click OK
2. Type the command mysql -u root -p, and press Enter to prompt you to enter your password. Note that there can be spaces before the username or there can be no spaces, but there must be no spaces before the password, otherwise you will be asked to re-enter the password.
3. If MYSQL has just been installed, the super user root does not have a password, so just press Enter to enter MYSQL. The MYSQL prompt is: mysql>
2. Connect to MYSQL on the remote host:
Assume that the IP of the remote host is: 110.110. 110.110, the username is root, and the password is 123. Then type the following command: mysql -h110.110.110.110 -u root -p 123; (Note: There is no need to add a space between u and root, and the same applies to others)
3. Exit the MYSQL command: exit (Enter)
More related free learning recommendations: mysql Tutorial(Video)
The above is the detailed content of How to connect window to mysql. For more information, please follow other related articles on the PHP Chinese website!