Error 2013 (HY000) occurs when a MySQL remote host is connected over TCP/IP: Lost connection to MySQL server at ' reading initial-communication ' , System error:104.
If you are in the Linux shell command line directly to the MySQL command, can be successfully connected to MySQL, execute query statement is also more normal, but if the execution of the STOP SLAVE; The error 2013 (HY000): Lost connection to MySQL server during query problem is randomly encountered when the command occurs. If you write the operation command to the script file and then execute the script file, you will inevitably appear Lost connection to the MySQL server at ' reading initial communication packet ', System error:1 11.
If there are any errors in remote access, it can be thought that the system has a firewall and so on, but now this strange cramp phenomenon is baffled. The last solution found is to add a startup parameter to the [MYSQLD] section inside the MY.CNF
Copy Code code as follows:
Skip-name-resolve
Problems disappear. But the reason is still not think why.