[mythtv-users] can't upgrade db

Tony Bones aabonesml at gmail.com
Wed Apr 28 04:33:16 UTC 2010


hmmm, that's what I did.  I followed the wiki and it still won't work.
everything seems good before i run mythtv-setup.

Pre DB Restore:

>  # mysql -umythtv -p mythconverg -e 'status;'
> Enter password:
> --------------
> mysql  Ver 14.12 Distrib 5.0.84, for pc-linux-gnu (i686) using readline 6.0
>
> Connection id:          5
> Current database:       mythconverg
> Current user:           mythtv at localhost
> SSL:                    Not in use
> Current pager:          stdout
> Using outfile:          ''
> Using delimiter:        ;
> Server version:         5.0.84-log Gentoo Linux mysql-5.0.84-r1
> Protocol version:       10
> Connection:             Localhost via UNIX socket
> Server characterset:    utf8
> Db     characterset:    latin1
> Client characterset:    utf8
> Conn.  characterset:    utf8
> UNIX socket:            /var/run/mysqld/mysqld.sock
> Uptime:                 2 min 56 sec
>
> Threads: 1  Questions: 218  Slow queries: 0  Opens: 209  Flush tables: 1
> Open tables: 1  Queries per second avg: 1.239
> --------------
>
>

DB Restore:

> # /usr/share/mythtv/mythconverg_restore.pl --filename
> mythconverg-1214-20100427193739.sql.gz
> Successfully restored backup.
>


Post DB Restore:

> # mysql -umythtv -p mythconverg -e 'status;'
> Enter password:
> --------------
> mysql  Ver 14.12 Distrib 5.0.84, for pc-linux-gnu (i686) using readline 6.0
>
> Connection id:          9
> Current database:       mythconverg
> Current user:           mythtv at localhost
> SSL:                    Not in use
> Current pager:          stdout
> Using outfile:          ''
> Using delimiter:        ;
> Server version:         5.0.84-log Gentoo Linux mysql-5.0.84-r1
> Protocol version:       10
> Connection:             Localhost via UNIX socket
> Server characterset:    utf8
> Db     characterset:    latin1
> Client characterset:    utf8
> Conn.  characterset:    utf8
> UNIX socket:            /var/run/mysqld/mysqld.sock
> Uptime:                 7 min 28 sec
>
> Threads: 1  Questions: 1291  Slow queries: 0  Opens: 409  Flush tables: 1
> Open tables: 5  Queries per second avg: 2.882
> --------------
>

mythtv-setup:

> 2010-04-27 21:30:33.670 Current MythTV Schema Version (DBSchemaVer): 1214
> 2010-04-27 21:30:33.670 MythTV database schema is old. Waiting to see if DB
> is being upgraded.
> 2010-04-27 21:30:34.671 New DB connection, total: 2
> 2010-04-27 21:30:34.672 Connected to database 'mythconverg' at host:
> localhost
> 2010-04-27 21:30:34.679 Current MythTV Schema Version (DBSchemaVer): 1214
> 2010-04-27 21:30:35.685 Current MythTV Schema Version (DBSchemaVer): 1214
> 2010-04-27 21:30:36.691 Current MythTV Schema Version (DBSchemaVer): 1214
> 2010-04-27 21:30:37.698 Current MythTV Schema Version (DBSchemaVer): 1214
> 2010-04-27 21:30:38.704 Current MythTV Schema Version (DBSchemaVer): 1214
> 2010-04-27 21:30:38.705 Timed out waiting.
> 2010-04-27 21:30:38.724 Backing up database with script:
> '/usr/share/mythtv/mythconverg_backup.pl'
> 2010-04-27 21:31:00.662 Database Backup complete.
> 2010-04-27 21:31:00.676 Backed up database to file:
> '/mnt/store/mythconverg-1214-20100427213038.sql.gz'
> 2010-04-27 21:31:04.237 Newest MythTV Schema Version : 1244
> 2010-04-27 21:31:04.248 Upgrading to MythTV schema version 1215
> 2010-04-27 21:31:04.249 New DB connection, total: 3
> 2010-04-27 21:31:04.250 Connected to database 'mythconverg' at host:
> localhost
> 2010-04-27 21:31:06.664 Database corruption detected. Unable to proceed
> with database upgrade. (Table: people, Warnings: 1481)
> 2010-04-27 21:31:06.665 Your database must be fixed before you can upgrade
> beyond 0.21-fixes. Please see
> http://www.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding for
> information on fixing your database.
> 2010-04-27 21:31:06.665 Database Schema upgrade FAILED, unlocking.
> 2010-04-27 21:31:06.665 Couldn't upgrade database to new schema.
>



After I run mythtv-setup:

> # mysql -umythtv -p mythconverg -e 'status;'
> Enter password:
> --------------
> mysql  Ver 14.12 Distrib 5.0.84, for pc-linux-gnu (i686) using readline 6.0
>
> Connection id:          23
> Current database:       mythconverg
> Current user:           mythtv at localhost
> SSL:                    Not in use
> Current pager:          stdout
> Using outfile:          ''
> Using delimiter:        ;
> Server version:         5.0.84-log Gentoo Linux mysql-5.0.84-r1
> Protocol version:       10
> Connection:             Localhost via UNIX socket
> Server characterset:    utf8
> Db     characterset:    utf8
> Client characterset:    utf8
> Conn.  characterset:    utf8
> UNIX socket:            /var/run/mysqld/mysqld.sock
> Uptime:                 9 min 55 sec
>
> Threads: 1  Questions: 4519  Slow queries: 0  Opens: 1329  Flush tables: 1
> Open tables: 64  Queries per second avg: 7.595
> --------------
>


-Tony

On Tue, Apr 27, 2010 at 9:13 PM, Michael T. Dean <mtdean at thirdcontact.com>wrote:

> <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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20100427/19ef6033/attachment-0001.htm>


More information about the mythtv-users mailing list