Jul 19
Digg
Stumbleupon
Technorati
Delicious

SHH! MySQL Backup

I was recently trying to backup one of my databases over PuTTY/SSH for a server move. Using the following:

mysqldump -hlocalhost -uUSERNAME -pPASSWORD <DATABASE

I was getting the following error:

mysqldump: Got error: 1105: File ‘./Database-Names/table_comments.MYD’ not found (Errcode: 24) when using LOCK TABLES

I couldn’t find a work around at first and most search results kept coming back to a bug in MySQL, which advised to make changes to the memory allowance, in this case that wasn’t an option.

I then came across http://www.webhostingtalk.com where a user by the name of SROHost mentioned that using:

–lock-tables=false

should fix the problem, well it did and for that I’m really grateful. As usual I tend to blog this stuff on my site, it serves to keep a personal record for me and to potentially help someone else in need.

mysqldump –lock-tables=false -hlocalhost -uUSERNAME -pPASSWORD <DATABASE

Note: This happening with a WordPress database.

[?]
Share This
Author: Tim

No Comments

No comments yet.

Comments RSS TrackBack Identifier URI

Leave a comment

You must be logged in to post a comment.

Close
E-mail It