[mythtv-users] can't upgrade db

Michael T. Dean mtdean at thirdcontact.com
Wed Apr 28 04:13:57 UTC 2010


<going back to the list>

On 04/27/2010 11:14 PM, Tony Bones wrote:
> On Tue, Apr 27, 2010 at 8:07 PM, Michael T. Dean wrote:
>    
>> On 04/27/2010 10:49 PM, Tony Bones wrote:
>>      
>>> Hi All,
>>> I took the plunge today and upgraded from 0.21 to 0.22.  I'm a amd64
>>> Gentoo
>>> user. I checked for db corruption as per the wiki and ran through the
>>> process backing up the db, making the changes and then restoring the db.
>>> When I run mythtv-setup it prompts me to upgrade the db, which I do and
>>> then
>>> it simply closes.  I ran with -v database so you could see below.
>>>
>>> Any ideas?  I have no myth ATM :(
>>>        
>> If you'd like to send me a link to the database backup (off list), I'll
>> explain exactly what you need to do to make it work.
>>
>> Also, make sure you do /not/ use the release tarball of 0.22.  Use (at
>> least somewhat current) 0.22-fixes.  Or, better, just use 0.23-fixes
> Hey, thanks for your help.
>
> I emerged the latest stable on gentoo for amd64, it's mythtv-0.22_p23069.
>    

That version of MythTV should be fine for the upgrade.

Your database is the easy case--equal corruption.  So, the "main" fix on 
http://www.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding will work.  
Basically, once you have a properly-configured-for-MythTV-0.21-fixes 
MySQL server, modify the backup file as at 
http://www.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding#Changing_the_backup_file 
, then drop the old database, do a full restore, then the upgrade will 
succeed without problems.

It is critical that you verify the configuration of your MySQL server ( 
http://www.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding#Determining_if_your_database_is_misconfigured 
) before you restore the backup.  If you're getting a failure after 
following the instructions on that page, it's because your MySQL server 
configuration isn't correct when you import the modified backup file.

Another option, which might make things easier if MySQL server 
configuration proves difficult, would be to install Mythbuntu on some 
system (with some never-to-be-used-by-any-mythtv-system hostname, such 
as dbconverter) temporarily, then restore the backup onto the MySQL 
server on that system, and run mythtv-setup to upgrade the database.  If 
you do this approach, you'll need to upgrade the pre-0.22-release 
version of MythTV that comes with Ubuntu 9.10 by enabling the 
auto-builds at http://www.mythbuntu.org/auto-builds for 0.22 (not 
0.23-fixes--unless you're going to upgrade your Gentoo boxes to 
0.23-fixes).  If you do this, make sure you use a hostname that is not 
being used by any of your other systems (to keep from having problems 
with hostname/IP address changed).  Once you've upgraded the database, 
shut down mythtv-setup, make a database backup ( 
http://www.mythtv.org/wiki/Database_Backup_and_Restore ), and then you 
can import the unmodified, 
created-from-the-upgraded-database-on-Mythbuntu database backup into 
your Gentoo MySQL server.  Once the upgrade is performed, your original 
MySQL server configuration will work fine.

Good luck,
Mike


More information about the mythtv-users mailing list