MySQL 2006 error (HY000) on line 406: MySQL server quit - even after increasing the size of the dump file

I am trying to move a database from server A to server B. I dumped mysql using the following command:

mysqldump -u root -p -c --add-drop-table --add-locks --quick --lock-tables mydatabase > /var/log/mydatabaseJan31.sql

      

Then on ServerB I try to import this data by doing the following:

mysql -u root -p mydatabase < /tmp/mydatabaseJan31.sql

      

I get the error "ERROR 2006 (HY000) on line 408: MySQL server left" almost immediately. I've read other stackoverflow posts about the same error message and I've tried the following:

  • modified my.cnf to include:

    [tuzdyshpr]
    fast
    max_allowed_packet = 64M

Then I restarted mysql. By the way, the file size is actually only 5.2mb

  • tried to create a dump file using phpmyadmin.
  • I don't think this is a timeout issue because it dies 2 seconds during the import process.
  • I opened the mysql dump file and checked the line number it was bombing on and this is part of a massive insert statement that starts on line 43. I'm not sure if this is relevant, but line 406 starts with an incomplete line:

    line 402 ----> (341,1996,12, '

    (341, 1996, 12, "interior"), (341,1996,13, 'interior'), (341,1996,13, 'rear'), (341,1996,14, 'front')

but having said that all the previous records that get inserted look the same ... so I don't think that's the problem either.

Any suggestions would be appreciated.

+3


source to share


1 answer


max_allowed_packet

must be installed on both client (mysql) and server (mysqld) to have any effect. Since your problem occurs while processing the dump, setting it to mysqldump will have no effect.



+4


source







All Articles