mySQL error 2006: mySQL has gone away

This was such a nice message.  mySQL has gone away.  To take a nap, or something.

I got this error when trying to copy a production database to my local machine so I could do some comparisons locally.  I dumped the database, but it failed to load.  In particular, there was a massive bulk insert statement that failed.

I added this to my.ini under the [mysqld] section:

max_allowed_packet = 16M

Restarted mySQL and my big bulk import statement causing the mySQL error 2006 went away.

Leave a Comment

Comments are moderated.