Hot Article
- Centos7 closes and restarts the system firewall and opens firewall ports
- How IID server uses Xshell to connect to Linux (centos) server
- BT panel forgets the background login URL, and the solution to the security entrance verification failure
- The php domain name points to ip, how to use the specified ip address to access a server in the url request domain name in curl mode
- How to purchase a dedicated server
- Error connecting to MySQL: Cant connect to MySQL server (10060)
Error connecting to MySQL: Cant connect to MySQL server (10060)
- Author:Kevin
- Category:Member Service
- Release Time:2022-03-29
When using the graphical interface management tool Navicat for MySQL to connect to the Mysql database, an error is displayed: Can't connect to MySQL server (10060)
problem causes:
Some problems may be caused by the following reasons:
1. The network is blocked;
2. The service is not started;
3. The firewall port is not open;
Solution:
Start the service:
service mysqld start;
After analysis, the problem I encountered was caused by the firewall!
Open firewall ports
Add the port to listen on
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
Save Settings
/etc/init.d/iptables save
View status
/etc/init.d/iptables status
Temporarily turn off the firewall service
service iptables stop
Enable firewall service
service iptables start
Firewall service no longer starts at boot
chkconfig iptables off
Notice:
This document is applicable to the server environment: CentOS 6.5 MySQL 5.6