[Email protected] ~]# mysql-uroot-h192.168.56.105-p
Enter Password:
ERROR 2003 (HY000): Can ' t connect to MySQL server on ' 192.168.56.105 ' (113)
Analysis of the problem
These problems may occur in the following ways
1. Skip-networking is configured in the MY.CNF configuration file
Skip-networking This parameter, so that all TCP/IP ports are not listening, that is, the native, other clients can not connect to the MySQL server network
So you need to comment out this parameter.
Parameter configuration for bindaddress in 2.MY.CNF configuration file
Bindaddress, there are bind-address, this parameter is to specify which IP addresses are configured so that the MySQL server only responds to which IP address requests, so this parameter needs to be commented out.
3. Causes of Firewalls
Shut down the firewall by/etc/init.d/iptables stop
My problem is caused by this reason. Shutting down the MySQL server's firewall is ready to use.
ERROR 2003 (HY000): Can ' t connect to MySQL server on ' 192.168.56.105 ' (113)