Contents
When do I get the lost connection to MySQL error?
I got the Error Code: 2013. Lost connection to MySQL server during query error when I tried to add an index to a table using MySQL Workbench. I noticed also that it appears whenever I run long query. Is there away to increase the timeout value?
When do I get the error code 2013 in MySQL?
If you spend time running lots of MySQL queries, you might come across the Error Code: 2013. Lost connection to MySQL server during query. This article offers some suggestions on how to avoid or fix the problem. This error appears when the connection between your MySQL client and database server times out.
What causes MySQL server to drop a connection?
This error appears when the connection between your MySQL client and database server times out. Essentially, it took too long for the query to return data so the connection gets dropped. Most of my work involves content migrations.
What is the error code for lost connection?
Error Code: 2013. Lost connection to MySQL server during query 30.002 sec There are a lot of issues with the same topic as mine but my content and issue seems to be different. In my workbench, i run the code > Error Code: 2013. Lost connection to MySQL server during query 30.002 sec
Why does MySQL hang when using TRUNCATE TABLE?
The TRUNCATE may hang, because other processes could use this table, so to check run in shell: Then kill the queries which are using it (change 123 to Id of the process): may also help to investigate any hangs. I faced same issue, and its resolved by restarting mysql server.
How to fix lost connection to MySQL Workbench?
Is the issue specific to MySQL Workbench? 1 Open the MySQL Workbench Preferences. 2 Check if the SSH Timeout and DBMS Timeout value is set to only a few seconds. 3 Try to increase the default value of the connection timeouts. 4 Save the settings, close the MySQL Workbench and reopen the connection to see if you are able to connect to the database.
How to change the timeout on MySQL Workbench?
You can try to change the timeout value on Workbench. Go to: Edit → Preferences → SQL Editor → DBMS connection read time out. See this post for more details: Error Code: 2013. Lost connection to MySQL server during query. Or try to increase the value in: Edit → Preferences → SQL Editor → DBMS_Connection keep alive interval. Share.
How to skip the read timeout on MySQL?
The maximum amount of time the query can take to return data from the DBMS.Set 0 to skip the read timeout. On Mac Preferences -> SQL Editor -> Go to MySQL Session -> set connection read timeout interval to 0.