Friday, August 21, 2009

I had an interesting run in with mySQL corruption the other day. At about 1:00AM, under deadline, I was restoring a mySQL dump to a reporting server, when I got a message something like "illegal character '/'"....and the backup died.

I scratch my head, did a new save, copied it to the report server. Same result. Google searches were less than helpful. I started experimenting.

Long story short - the problem was (lightly) corrupted tables.

I went to /var/lib/mysql/[account] and typed: $ mysqlisamchk *.MYI | grep "ld be che" to find the corrupted tables.

I then ran repair table [table] within the mysql shell.

Resaved, and happy days, all was working.

mySQL needs some better error messages.

No comments: