Apply OS: Windows, macOS, Linux, iOS

Apply Navicat Product: Navicat for MySQL, Navicat for MariaDB, Navicat Premium

Apply Navicat Version No.: All

The error you received "Error: 2013 Lost connection to MySQL server during query" is returned by MySQL and is due to server variables settings.

For more details on how to set the server variable to avoid this error, please refer to MySQL Manual -


macOS version 10.x - 11.2

If you receive "Lost connection to server during query" error when running long query, please try:

  1. Control-click your connection and choose Connection Properties/Edit Connection.
  2. Under Advanced tab, set the Socket Timeout (sec) to a larger value.


Have more questions?
Submit Ticket