MySQL server has gone away (MySQL Server)

Author: Zeeshan Arshad     1345     04/03/2012

Estimated reading time: 0 minutes, 24 seconds

Zeeshan Arshad - Lifestyle Blog

Problem: When trying to import OR restore database, the error returns "Mysql server has gone away".


Step: Edit [my.cnf -OR- my.ini whichever your web server is using] file that resides inside mysqlbin folder and then try either one OR both of the following solutions.


Solution 1: Set max_allowed_packet = 64M


Reason 1: Server dropped a large or incorrect packet.


Solution 2: Set wait_timeout = 600


Reason 2: Server timed out and connection was closed.

« Return to Blog