In MySQL, how can I solve the error below?
2013: Lost connection to MySQL server at \'reading authorization packet\', system error: 0
From documentation:
More rarely, it can happen when the client is attempting the initial connection to the server. In this case, if your
connect_timeout
value is set to only a few seconds, you may be able to resolve the problem by increasing it to ten seconds, perhaps more if you have a very long distance or slow connection. You can determine whether you are experiencing this more uncommon cause by usingSHOW STATUS LIKE 'aborted_connections'
. It will increase by one for each initial connection attempt that the server aborts. You may see“reading authorization packet”
as part of the error message; if so, that also suggests that this is the solution that you need.
Try increasing connect_timeout
in your my.cnf
file