[mythtv-users] database issues: 0.21 to trunk

Michael T. Dean mtdean at thirdcontact.com
Fri Apr 3 04:25:10 UTC 2009


On 04/03/2009 12:16 AM, Johnny wrote:
> On Fri, Apr 3, 2009 at 12:07 AM, Greg Woods wrote:
>   
>> On Thu, 2009-04-02 at 22:09 -0400, Michael T. Dean wrote:
>>     
>>> On 04/02/2009 09:48 PM, Greg Woods wrote:
>>>       
>>>> # mysqldump mythconverg > mythconverg.sql
>>>> mysqldump: Got error: 1146: Table 'mythconverg.weatherdatalayout'
>>>> doesn't exist when using LOCK TABLES
>> I have determined that, somehow, I'm screwed. I copied over
>> the /var/lib/mysql/mythconverg files from the old system to another
>> 32-bit system running the same distro (Fedora 8) as the old system, and
>> I get the same error when I try to run mysqldump there.

Regardless of what the MySQL guys will tell you, you should /never/ move 
the binary MySQL data files from one system to another--especially if 
the MySQL versions differ.

>>  Obviously the
>> old database is corrupted and I'm screwed. It probably got corrupted
>> when the system died.

Try running a mysqlcheck on the old database (you can run 
optimize_mythdb.pl, but since it uses the MythTV Perl bindings, it will 
only work with a running mythbackend that's using that database, so if 
you've already "decommissioned" that backend, just do mysqlcheck 
directly).  Then, use the scripts mentioned at the wiki page linked 
below to try to get a good backup.  Then, drop the corrupt DB on the new 
system, run mc.sql, then restore the new backup of the old database.

>>  I'll either have to use a relatively old backup or
>> find some other way to get my recording info into a newly-created
>> database (I think I read there is a script that can help with this?)
>>     
> Your probably thinking of this:
> http://www.mythtv.org/wiki/Database_Backup_and_Restore. Look at the
> partial restore in particular. I had to do this recently because of
> something getting corrupt with one of my tuners. The partial restore
> kept all of my recording data perfectly.

Note that you have to apply a patch to the script if you're doing a 
partial restore that doesn't include the plugin data...  
http://svn.mythtv.org/trac/ticket/6013

Mike


More information about the mythtv-users mailing list