Use SQLyog to connect MySQL times with the following error:
ERROR 2013:lost connection to MySQL server @ ' Waiting for initial communication packet ', System error:2
After other tests found the account and password, the Telnet port is not a problem.
Solve:
Client-side parsing process:
1, when the client initiates a connection request, the server proactively checks the host name of the client.
2, first find the/etc/hosts, search the domain name and IP corresponding relationship.
3, if the Hosts file does not, then look for DNS settings, if not set up the DNS server, will immediately return to failure, if the DNS server is set, the reverse resolution, until timeout the following error occurs.
The main cause of the above problems is host and IP resolution problem.
Modify the MySQL configuration file
Vi/etc/my.cnf
[Mysqld]
Skip-name-resolve
After restarting MySQL, the connection is OK.
MySQL Common errors