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:
http://bugs.mysql.com/bug.php?id=32543 (see post 7 Dec 2007 15:05)
See also http://dev.mysql.com/doc/refman/4.1/en/program-variables.html.
0 kommentarer:
Post a Comment