Home  >  Article  >  Database  >  How to connect window to mysql

How to connect window to mysql

coldplay.xixi
coldplay.xixiOriginal
2020-09-29 14:12:473546browse

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 window to mysql

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>

How to connect window to mysql

How to connect window to mysql

How to connect window to 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)

How to connect window to mysql

3. Exit the MYSQL command: exit (Enter)

How to connect window to mysql

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn