Solution for DBD::mysql::db do failed: MySQL server has gone away at mysqlhotcopy line 528.
I have found that when running mysqlhotcopy to backup a database, it always throws an ominous looking error when finished.
DBD::mysql::db do failed: MySQL server has gone away at mysqlhotcopy line 528.
This type of error would lead you to believe the backup failed, when in actuality it worked just fine. I have restored from backups that resulted in this error just fine.
The solution to this error is to modify the system variables interactive_timeout and wait_timeout from the default settings. Inside your my.cnf file (usually located at /etc/my.cnf) put the following lines.
interactive_timeout=3600 wait_timeout=3600
You may have to adjust up for larger databases. These particular settings work for me with 15-20GB databases. Here is the result I get upon completion.
Copying 691 files... Copying indices for 0 files... Unlocked tables. mysqlhotcopy copied 230 tables (691 files) in 416 seconds (417 seconds overall). [root@mysql2 scripts]#Posted in Sysadmin