1. See if the/ETC/MYSQL/MY.CNF configuration file only allows local connections
Note configuration: #bind-address = 127.0.0.1, restart MySQL Server
2, Firewall (I use iptables) prohibit 3306 port access
Add the 3306 port to the/etc/sysconfig/iptables configuration file, and then restart the firewall by adding the following:
-A input-m state--state new-m tcp-p TCP--dport 3306 -j ACCEPT
3. mysql does not grant the appropriate permissions
Authorized user username use password to connect to MySQL Server from any host and allow access to all tables in all databases
*.* 'username '@'%'password' with GRANT option;mysql >flush privileges;
Allows user username to connect to MySQL Server using password from IP- 192.168.1.9 hosts and allows access to all tables in all databases
*.* ' username '@'192.168.1.9'password ' with GRANT OPTION; MySQL>flush privileges;
Allow user username to connect to all tables under the DSP database of MySQL server using password from a host with IP 192.168.1.9
dsp.* 'username '@'192.168.1.9'password' with GRANT OPTION; MySQL>flush privileges;
4. Modify the host limit of the corresponding user username in the users table in the MySQL database
$mysql-H127.0.0.1 -P3306 -u root–pmysql> UseMysql;mysql>Update User SetHost= '%' where User= 'username'; MySQL>SelectHostUser from User;
OK,:)
MySQL cannot connect remotely to a solution