Insights and outlooks on software development


MySQL error when restoring large sets of data

Wednesday, May 14, 2008 by Thomas L

So there I was, humming along with doing some mysql administration, basically MySQL dump ('mysqldump -u username -p mydatabase table1 table2 > some_file.sql') and a restore ('mysql -u username -p someotherdatabase < some_file.sql'). Suddenly I got the error:

"ERROR 2006 (HY000) at line 123: MySQL server has gone away"

After some head-scratching and a couple of googlings, I found out that the crash happened since the inserts exceeded the max_allowed_packet size. The solution was to increase the max_allowed_packet from 1M to 16M, by editing my.ini for my MySQL installation.

This happened for a 4.1 MySQL instance; I don't know if it's fixed in later versions.

References: (see post 7 Dec 2007 15:05)

See also

Filed under having  

0 kommentarer: