MAMP error #2006 – MySQL server has gone away

I’ve been trying to debug an error on one of the websites I developed a while back. The site in question is the website for Letchworth & Baldock District Scouts and it was built using Concrete5.

To allow me to insert debug code I built a replica of the site on my Mac using MAMP. However, when I tried to import the database I got the following error

#2006 – MySQL server has gone away

Obviously the size of the import file was too big. The solution was simple:

Create a file called “my.cnf” file in /Applications/MAMP/conf containing the following code:


max_allowed_packet = 100M

Restart the MAMP servers and the import should proceed to completion.

Author: Gareth Howell

IT Professional, radio amateur, scout leader and beer drinker. I enjoy helping small business use their limited IT budgets to best effect