[mythtv-users] Help running mythtv-setup
Michael T. Dean
mtdean at thirdcontact.com
Thu Mar 8 22:10:12 UTC 2012
On 03/08/2012 04:25 PM, James Klaas wrote:
> OK, I decided to try restoring the database and going from there to
> bypass the problems with the QT libraries and ended up stuck on
> another issue that I ran into before.
>
> mythtv-setup complains about needing to update the MythTV schema. It
> goes through, backs up the database, then it fails:
>
> Newest MythTV Schema Version : 1299
> Upgrading to MythTV schema version 1277
> DB Error (Performing database upgrade): Query was: ALTER TABLE record
> ADD COLUMN filter INT UNSIGNED NOT NULL DEFAULT 0; Error was: Driver
> error was [2/1060]: QMYSQL: Unable to execute query Database error
> was: Duplicate column name 'filter' new version: 1277
> Database Schema upgrade FAILED, unlocking.
> Couldn't upgrade database to new schema.
>
You're trying to upgrade a database that was partially upgraded, so is
in a bad state. You want to find a pre-upgrade backup (before you
started the upgrade the first time). If you didn't manually create a
backup before upgrading, the upgrade will have tried to back up the
database for you. Those backups are stored in a directory in your DB
Backups storage group, or--if you haven't defined directories for DB
Backups--in a directory in the Default storage group (and, if all else
fails and you have no defined storage group directories, in the /tmp
directory--which could be cleared by your distro on reboot, so you would
need to get it before it's lost).
A MythTV 0.24-fixes backup will be Schema Version 1264--so, if created
by MythTV or the mythconverg_backup.pl script, will have a name like:
mythconverg-1264-20120308065307.sql.gz
where that 1264 is the schema version and the following number is the
date and time. Find all the mythconverg-1264-* files and you probably
want to restore the most-current of those (but look at dates and times
to make sure that's what you want).
Mike
More information about the mythtv-users
mailing list