1, first confirm whether the local can connect
Empower users with local ability to connect
Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' Youpassword ' with GRANT option;
Mysql>flush privileges;
2. Open/ETC/MY.CNF
Comment out the option skip-networking (Note: Some of the information is also said to be bind-address set to 127.0.0.1, I don't see this sentence in my profile, there is no setting. This option is used to set the IP for external access to MySQL, there is a filtering function, and there is no need to set up).
3. To see if the firewall has blocked 3306 ports. CentOS system words, in/etc/sysconfig/iptables, there is no such sentence:
-j accept does not add, or the following accept is drop, will be changed to accept on the line
*filter:input ACCEPT [0:0]:forward ACCEPT [0:0]:output ACCEPT [0:0]-A input-m state--state established,related-J ACCEPT-A input-p ICMP-J ACCEPT-A input-i lo-J ACCEPT-A input-p tcp-m TCP--dport3306-J ACCEPT-A input-m state--state new-m tcp-p TCP--dport A-J ACCEPT-A input-j REJECT--reject-with icmp-host-prohibited-A forward-j REJECT--reject-with icmp-host-Prohibitedcommit
4. Restart the firewall and MySQL
Service Iptables Restart
Original: http://www.cnblogs.com/aimeiren/p/6236370.html
MySQL Remote connection 10038