When connecting to a MySQL remote host through TCP/IP, error 2013 (HY000): lost connection to MySQL server at ‘reading initial communication packet’, system error: 104 appears.
If you directly type MySQL in the Linux shell command line, you can connect to MySQL smoothly and execute the query statement normally, but if you execute stop slave; The problem of error 2013 (HY000): lost connection to MySQL server during query appears at random. If you write the operation command to the script file and then execute the script file, there will be lost connection to MySQL server at ‘reading initial communication packet’, system error: 111
If there are errors in remote access by any means, it can be considered that the system has firewall restrictions, but now this strange cramp phenomenon makes people puzzled. The final solution is to add a startup parameter in the [mysqld] section of my. CNF
skip-name-resolve
The problem disappears. But I can’t figure out why
The reason is that I set skip name resolve in my.cnf, and skip name resolve is to disable DNS resolution, so I can’t use the host name in the authorization table of MySQL, I can only use IP
Similar Posts:
- mysql Remote connection problems: Lost connection to MySQL server at ‘reading initial communication packet’, syste…
- [Solved] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=20131)
- How to Solve Navicat Remote Connection to MySQL is Stuck
- [Solved] Python pymysql.err.OperationalError: (2013, ‘Lost connection to MySQL server during query…
- Error while sending query packet in PHP runtime
- ERROR 2006 (HY000): MySQL server has gone away No
- MySQL external import data error [How to Solve]
- Sqlog recovery database error solution [error code: 2006 – MySQL server has gone away]
- Mysqldump common error reports and Solutions
- mysql ERROR 1044 (42000): Access denied for user ‘