Markus Hedlund

Developer / Photographer

Contact / GitHub / Instagram

“2006 - MySQL server has gone away” error when importing with SQLyog

Get this annoying error when importing a database with SQLyog? "There was an error executing the query. […]". When you click "Open error file…" the real MySQL error is presented: "Error Code: 2006 - MySQL server has gone away".

Solution

Open "my.ini", located in your MySQL installation folder, and change "max_allowed_packet = 1M" to "max_allowed_packet = 64M" or something higher than 1 MB.

The problem is that SQLyog sends a massive SQL query that exceeds this limit.

2010-11-08