Archive for the ‘MySQL’ Category.

mysqlhotcopy cause MySQL server has gone away

As I was performing a backup for a ~5GB database on a new db server, I encounter this error.

DBD::mysql::db do failed: MySQL server has gone away at /usr/bin/mysqlhotcopy line 521.

The above means that the MySQL timeout while doing the mysqlhotcopy, you just need to increase the timeout. If your database is really huge, you will need to adjust the timeout accordingly.

For me, I will just set 15mins.

Append the following lines to /etc/my.cnf under [mysql] section

interactive_timeout = 3600
wait_timeout = 3600

Hope this helps!