Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0

Understand the process of mysql processing client parsing:
1. When mysql client initiates a connection request, MySql Server will actively check the client's host name.
2. First, find the /etc/hosts file in the system directory, and search for the correspondence between the domain name and the IP.
3. If there is no hosts file, look up the DNS settings. If the DNS server is not set, it will return a failure immediately; if the DNS server is set, reverse resolution will be performed until the timeout and the following error will occur.
The mysql remote connection has ERROR 2013 (HY000): Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0 error, the solution is as follows.
There is another problem, I also solved it in the same way, that is, use show processlists; when viewing, the user becomes unauthenticated user
to modify the mysql configuration file
vi /etc/my.cnf


[mysqld] #Add
the following code, pay attention to the following This code is best added to the first line of the [mysqld] section. Because, the first time I added to the last line. As a result, the mysqld service cannot be started.
skip-name-resolve
 
restart mysql
service mysqld restart  
Note: skip-name-resolve will prevent MySql Server from performing DNS resolution on external connections. Using this option can eliminate the time MySql takes for DNS resolution. However, it should be noted that if this option is enabled, all remote host connection authorizations must use the IP address method, otherwise MySQL will not be able to process connection requests normally.
Reprint please indicate the source: ERROR 2013 (HY000): Lost connection to MySQL server at 'waiting for initial communication packet', s
http://www.php1.cn/Content/ERROR2013-HY000--LostconnectiontoMySQLserverat-waitingforinitialcommunicationpacket--s .html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325774860&siteId=291194637