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

What should I do if mysql cannot connect remotely?

王林
Release: 2020-09-15 14:20:54
Original
2296 people have browsed it

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!

Related labels:
Statement of this Website
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template