Fix Lost connection of mysql server during query

How to fix lost connection of MySQL server during query?

This issue caused of running a long query.

  1. To fix this on MySQL Workbench, you can change the option of connection read time out. In my case using Mac click : MySQLWorkbench > Preferences > SQL Editor.
  2. On MySQL Session part, increase the “DBMS connection read timeout interval (in seconds)” value.
  3. Click OK to save then restart your connection on MySQL Workbench.