To solve the problem that IP cannot connect to mysql: first execute the command "grant all privileges on *.* to 'username'@'IP address' identified by 'password';" in Navicat tool; then refresh Just click the permissions.
Recommendation: "mysql tutorial"
MySQL native IP cannot be connected, so use localhost and 127.0. 0.1 can connect | Solution
1. Use the command in Navicat tool or other tools: (remove all ' single quotes)
grant all privileges on *.* to '用户名'@'IP地址' identified by '密码';
2. After executing the above command, use the following Use the command to refresh the permissions
flush privileges;
Specific instructions:
all privileges: All permissions can also be written as select, update, etc.
*.*: All tables of all libraries such as databasename .*
Username: The user name that needs to be logged in
IP: The IP address of the database
identified by 'password' means connecting by password
The above is the detailed content of How to solve the problem that IP cannot connect to mysql. For more information, please follow other related articles on the PHP Chinese website!