Error code

MySQL 2013

MYSQL2013
Database Error Code· An error code returned by a database server such as PostgreSQL or MySQL.

What it means

Lost connection to MySQL server during query — connection dropped while a query was running.

How to fix it

  1. Increase net_read_timeout and net_write_timeout in my.cnf for slow or large queries.
  2. Optimize the query to reduce execution time and avoid connection timeouts.
  3. Add network-level keep-alive settings and ensure reliable connectivity between client and server.

Not affiliated with MySQL. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.