Home >Database >Mysql Tutorial >What should I do if mysql cannot connect remotely?
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.
(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;
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.
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!