Friday, September 10, 2010

Solution for: MySQL server has gone away at mysqlhotcopy line 528

January 19, 2009 by Josh Highland  
Filed under MySQL, linux, software

mysql-logo

Recently I was backing up a large MySql database (several hundred megabytes), using the awesome MySqlHotCopy script, when I started getting the following error:

DBD::mysql::db do failed: MySQL server has gone away at mysqlhotcopy line 528.

I have no clue what that error means. mysqlhotcopyworked great on all of my other smaller databases. I did a little searching on my old friend google, and after sniffing around a bit, I came up with a resolution to the problem… the script was timing out, so I just had to increase the allowed time in the /etc/my.cnf file.

Here are the steps I took

pico /etc/my.cnf

add these lines to the file:
interactive_timeout = 3600
wait_timeout = 3600

save file

/etc/init.d/mysqld restart

I ran mysqlhotcopy again, and everything worked and the backup was made.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • MySpace
  • Ping.fm
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks

Comments

One Response to “Solution for: MySQL server has gone away at mysqlhotcopy line 528”
  1. Coly Moore says:

    Thank you! I was completely baffled by this error until you clued me in that it was a timeout. I put in 3600 and got a good run.
    3600 (one hour) seems like a bit much, though.

    mysqlhotcopy ended with:
    Copying 362 files…
    Copying indices for 0 files…
    Unlocked tables.
    mysqlhotcopy copied 120 tables (362 files) in 162 seconds (171 seconds overall).

    So for me 180 seconds (3 minutes) looks like plenty. I’m so happy I now know where to look in case of future “mysql server has gone away”. :D

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!