In MySQL, how can I solve the error below?
2013: Lost connection to MySQL server at 'reading authorization packet', system error: 0
You can check this out by going to Server > Client Connections on MySQL Workbench and make sure there are no processes/queries still running that pertain to the import. Next, I would recommend increasing the timeout intervals for your MySQL Session. That can be found on MySQL Workbench under Edit > Preferences... >
You can edit the SQL Editor preferences in MySQL Workbench: In the application menu, select Edit > Preferences > SQL Editor. Look for the MySQL Session section and increase the DBMS connection read time out value. Save the settings, quite MySQL Workbench and reopen the connection.
The error above commonly happens when you run a long or complex MySQL query that runs for more than a few seconds. To fix the error, you may need to change the timeout-related global settings in your MySQL database server.
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
Adding skip-name-resolve
to my.cnf
solved the problem for me.
I had this same issue today and it turned out to be an issue with mysql 5.6.*. After uninstalling that and installing 5.5.36, I'm not getting this error anymore.
EDIT: On another computer, I was getting this error very consistently until I set this in my.cnf:
[mysqld]
max_allowed_packet = 32M
Well, technically, my error was slightly different:
_mysql_exceptions.OperationalError: (2013, "Lost connection to MySQL server at 'sending authentication information', system error: 32")
I was having this problem too. For me the solution was to comment out the line:
skip_networking
I simply added the comment #, like this:
#skip_networking
And then I restarted mysql and it was all good!
Beware, this will disable all ability to make network connections to MySQL. If you are only using as localhost, it should be fine, but otherwise, watch out! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With