Linux wants to connect to the database with Navcat after it has finished loading MySQL:
1. Log in to MySQL, authorize remote access for root, and execute the following command:
Mysql> GRANT All privileges on * * to [email protected] '% ' identified by ' root ';
mysql> flush Privileges;
The "%" in the first sentence indicates that any host can be accessed remotely to the server. If you want to restrict access to only one machine, replace it with the appropriate IP, such as:
GRANT all privileges on * * to [e-mail protected] "172.168.193.25" identified by "root";
The second sentence reloads the permission data from the grant table in the MySQL database. Because MySQL puts permissions in the cache, it needs to be reloaded after the changes have been made.
2, modify/etc/mysql/my.cnf, need root user rights. Locate the file in:
Bind-address = 127.0.0.1
Comment It out and save it.
3. Restart the MySQL server. Follow these few commands:
#/usr/bin/mysqladmin-u Root-p shutdown
#/usr/bin/mysqld_safe &
If Mysqladmin and Mysql_safe are not in the/usr/bin directory, they can be found through the Whereis command, for example:
# Whereis Mysqladmin
Mysqladmin:/usr/bin/mysqladmin/usr/share/man/man1/mysqladmin.1.gz
After performing the above three steps, the database database has not been connected and Can ' t connect to MySQL Server (10060) exception
4. Open 3306 ports in iptables
#/sbin/iptables-i input-p TCP--dport 3306-j ACCEPT
#/etc/rc.d/init.d/iptables Save:
# Service Iptables Restart restart effective
Of course, in addition to opening 3306 ports, another way is to shut down the firewall, the command is:
# Service Iptables Stop
However, this is not recommended because it can cause security issues.
MySQL allows remote access