Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (20.3k points)

Error Code: 2013. Lost connection to MySQL server during query

I am using MySQL Workbench. Also, I am running a batch of inserts, about 1000 lines total (Ex. 

INSERT INTO mytable SELECT * FROM mysource1; INSERT INTO mytable SELECT * FROM mysource2;...mysource3...mysource4 

multiplied 1000 times) Each batch takes a considerable amount of time, some of them, more than 600 seconds.

How can I configure workbench, to continue working overnight, without stopping and without losing the connection?

1 Answer

0 votes
by (40.7k points)

Follow the below steps to keep the connection alive:

Step 1: Go to Edit 

Step 2: Select Preferences 

Step 3: Go to SQL Editor and set to a higher value this parameter: DBMS connection read time out (in seconds). For instance: 86400.

Step 4: Close and reopen MySQL Workbench. Kill your previous query that probably is running and run the query again.

For more information, you can refer to :

https://web.archive.org/web/20130322031356/http://www.hassmann-software.de/mysql-workbench-lost-connection-to-mysql-server-after-600-second

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...