Home  >  Article  >  Database  >  What should I do if mysql cannot connect remotely?

What should I do if mysql cannot connect remotely?

王林
王林Original
2020-09-02 15:19:492096browse

Solution to the problem that mysql cannot be connected remotely: First open the command prompt and log in to mysql; then execute the [grant all privileges on *.* to root@"ip" identified by "password"] command to grant the database Remote access permissions; just refresh the permissions at the end.

What should I do if mysql cannot connect remotely?

(Video tutorial: mysql video tutorial)

Solution to the problem that mysql cannot be connected remotely:

1. First open the command prompt and execute the mysql -u root -p command;

What should I do if mysql cannot connect remotely?

2. Then execute grant all privileges on * .* to root@"xxx.xxx.xxx.xxx" identified by "password"; command gives all permissions to IP-xxx.xxx.xxx.xxx, including remote access permissions.

(Recommended tutorial: mysql tutorial)

3. Finally, execute the flush privileges; command to refresh the permissions.

What should I do if mysql cannot connect remotely?

The above is the detailed content of What should I do if mysql cannot connect remotely?. 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