[mythtv-users] mysql database problems, really need advice

ffrr ffrr at tpg.com.au
Sat Jul 23 07:26:44 EDT 2005

I think I damaged a table (mythconverg.recordedmarkup) trying to import 
a .nuv file that had been exported using nuvexport.  It didn't import 
completely, failing about line 6 in the script that nuvexport wrote, but 
it did import well enough for me to be able to watch it.

However, I noticed some errors with this table when a couple of new 
shows were recorded.   I also noticed that pressing the 'e' key while 
watching the new shows would not take me into edit mode.

In the docs, it talks about mysqlcheck.  Running this did report that 
the table was damaged.  I then ran it again, with the -r (repair) 
option, again as per some docs.   It seemed to fix the table but had 
issues later in the repair with mythconverg.smartplaylistcategory.     

Also, something very bad happened at this point because running it again 
started  giving errors that the tables were read only.  Running mythtv, 
all data about tv guide, and recorded shows etc was missing.  More than 
a little worried :-(, I tried to shut down the mysqld server, and 
restart it, but it could not be shutdown (according to mandriva control 
centre).  I rebooted the whole box at this point, and many messages 
about readonly file systems in the area of /var were reported as it shut 
down.  On reboot, significant repairs were needed to /dev/sda8 (which is 
where /var is mounted on my system).

Ok, so, deep breath...  I log in and check mysqld.  It is running.  I 
stop and restart it for good measure. All working.  I start mythbackend, 
and then mythfrontend.   Luckily, all my data is back.  Good, so I start 
a show recording, and then go and watch it while still recording.  All 
working, AND I can go into edit mode.

So it's looking good.  

Mysqlcheck still reports one problem
error    : File './mythconverg/smartplaylistcategory.MYD' not found 
(Errcode: 2)
(what is that?)

Now, also, I want to back up my data at this point.  Being new to myth, 
I haven't done this before, but the docs look straightforward enough.  
However, a small question.  Should ...

mysqldump -u mythtv -pmythtv mythconverg -c > mythtv_backup.sql

 be run with the database up and running, but should I make sure myth 
(front and backend) is NOT running when I do it?

What else should I do?  Should I delete the database and recreate it, or 
will it be OK now?  If I do recreate it, should I import the data back 
in, or would that bring back corruption from the above incident?

More information about the mythtv-users mailing list