MySQL server has gone away
در صورتی که پس از بازگردانی backup با پیغام MySQL server has gone away مواجه می شوید وارد مسیر زیر شوید:
nano /etc/my.cnf
مقدار زیر را در این فایل ویرایش و افزایش دهید:
max_allowed_packet = 2000M
در صورت نیاز این خط را اضافه نمایید.
During a restore, if you get an error similar to:
Unable to restore database user&#db.sql to user_db : ERROR 2006 (HY000) at line 403 in file: '/home/user/backups/backup/user_db.sql: MySQL server has gone away
it could mean either:
1) The server timed-out (8 minute default) and disconnected. Adjusted by the wait_timeout value in the my.cnf.
2) MySQL could have been restarted mid-restore
3) or for many large databases, if the max_allowed_packet option, in the [mysqld] section of the /etc/my.cnf is too small, mysqld may abort if it hits a packet larger than that. If you've installed the my-huge.cnf, it has a default max_allowed_packet value of 1M. Try changing it to 5M or 10M, then restart mysqld and try again.