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

user836026 picture user836026 · May 12, 2012 · Viewed 525.1k times · Source

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?

Answer

eric william nord picture eric william nord · Oct 9, 2012

New versions of MySQL WorkBench have an option to change specific timeouts.

For me it was under Edit → Preferences → SQL Editor → DBMS connection read time out (in seconds): 600

Changed the value to 6000.

Also unchecked limit rows as putting a limit in every time I want to search the whole data set gets tiresome.