Repairing MythTV tables

MySQL 5.0 Reference Manual :: 5.10.4.3 How to Repair Tables

I’ve just been trying to backup my MythTV tables. Previously I’ve used PHPMyAdmin. However, I thought I would try command line and automate it.

mysqldump -u root -p mythconverg > mythconverg-`date +%F`.sql
However, I constantly got a error message
Can't open file: (errno: 145) when using LOCK TABLES mythtv

So i discovered I needed to repair the tables. The above docuimentation is pretty easy but basically.

cd /var/lib/mysql.mythconverg
myisamchk -e *.MYI

Then run the following command on each table that shows errors:
myisamchk -r -q program.MYI

Easy peaasy lemon squeezy!

This entry was posted in Computergeekery and tagged , . Bookmark the permalink.