MySQL

#2006 MySQL server has gone away

TAGs: 1 Comment

Posted By: eligeske on in MySQL

Recently I was doing an import of a clients database from production which was so so in size. But I was installing it on a fresh install of WAMP Server. First it died because of upload_max_filesize inside the php.ini, that one is a simple one. After changing that to a size larger than the db import script PHPMYADMIN threw the #2006 MySQL server has gone away.

After scouring the web and the mysql site and found that if a packet is too large the mysql connection will be closed.

So to set the max size allowed for the packet in mysql change:

max_allowed_packet = 60M

By default it was set to 1M and 60 seemed to be plenty to do the trick.

 

One Response to "#2006 MySQL server has gone away"

"SHARING IS CARING"
  1. Mittal Patel says:

    Yeah, making key_buffer and max_allowed_packet 16M usually solves this issue.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Learning DHTMLX Suite UI

Learn the foundation of the DHTMLX Suite quickly while building a single page application with multiple components in harmony.

Popular post