When using navicat, sometimes we will encounter this situation. We can connect using localhost, but when using the IP address, navicat will report an error and cannot connect. The editor below will introduce to you the solution to the problem that the navicat database IP cannot be connected.
Recommended tutorial: navicat usage tutorial
Problem introduction:
1. Successful localhost connection:
2. Unsuccessful connection using ip:
Solution:
Enter mysql under windows:
C:\WINDOWS\system32>net start mysql C:\WINDOWS\system32>mysql -uroot -p123456
PS: -p# The 123456 after ## is the password of the database, please change it.
Enter the following command at the mysql command line:mysql> use mysql;
mysql> update user set host='%'where user='root';
mysql> flush privileges;
The above is the detailed content of Navicat database ip cannot be connected. For more information, please follow other related articles on the PHP Chinese website!