Some days ago a group of friends in the group asked about MySQL intranet access problem, long time no one answer, in this slightly recorded, also convenient for later search
Figure 1:650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7A/4A/wKioL1anEKXRK2ukAAMHoVdqQu0552.jpg "title=" Mysqlerroe001.jpg "alt=" Wkiol1anekxrk2ukaamhovdqqu0552.jpg "/>
The reason for this problem is that the server firewall is not open port, Linux configuration ( turn from : http://www.myhack58.com/Article/48/66/2012/34999.htm), the experience of predecessors must be absorbed,
Vi/etc/sysconfig/iptables
-A input-m state–state new-m tcp-p tcp–dport 80-j ACCEPT (allow 80 ports through the firewall)
-A input-m state–state new-m tcp-p tcp–dport 3306-j ACCEPT (Allow 3306 ports through the firewall)
Special Note: Many netizens add these two rules to the last line of the firewall configuration, causing the firewall to fail to start, the correct one should be added to the default 22 port under this rule
After adding the firewall rules as follows:
# #####################################
# Firewall configuration written by system-config-firewall
# Manual Customization of this file was not recommended.
*filter
: INPUT ACCEPT [0:0]
: FORWARD A ccept [0:0]
: OUTPUT ACCEPT [0:0]
-a input-m state–state established,related-j accept
-A INP Ut-p icmp-j accept
-a input-i lo-j accept
-a input-m state–state new-m tcp-p tcp–dport 22-j AC cept
-a input-m state–state new-m tcp-p tcp–dport 80-j accept
-a input-m state–state new-m TCP -P tcp–dport 3306-j accept
-a input-j reject–reject-with icmp-host-prohibited
-a forward-j reject– Reject-with icmp-host-prohibited
commit
#####################################
/etc/init.d/iptables restart
#最后重启防火墙使配置生效
Windows configuration, own Baidu;
Figure 2:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7A/4A/wKioL1anEeKiYEa4AAKRSphx2ec624.jpg "title=" Mysqlerroe002.jpg "alt=" Wkiol1aneekiyea4aakrsphx2ec624.jpg "/>
The reason for this problem is that the server's MySQL does not set the external IP to access its services, that is, the external access rights, the workaround (the address is forgotten, sorry), into the server MySQL Execute SQL statement, as follows:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7A/4B/wKiom1anEhqgR5M7AAJFP4JlvbY178.jpg "title=" Mysqlerroe003.jpg "alt=" Wkiom1anehqgr5m7aajfp4jlvby178.jpg "/>
Basic to this can be solved, a little need to pay attention to the problem, here to mention, internal testing should pay attention to the network connection, wireless connection should pay attention to the settings of the router.
This article is from the "Imagination" blog, please be sure to keep this source http://9919523.blog.51cto.com/9909523/1738607
Connection issues with the intranet database