[mythtv-users] phpmyadmin no unique on settings table?

Hika van den Hoven hikavdh at gmail.com
Wed Jul 8 16:09:14 UTC 2015


Hoi Steven,

Wednesday, July 8, 2015, 6:00:03 PM, you wrote:

> On Wed, Jul 8, 2015 at 11:58 AM, Steven Adeff <adeffs.mythtv at gmail.com> wrote:
>> On Sat, Jul 4, 2015 at 9:26 AM, Steven Adeff <adeffs.mythtv at gmail.com> wrote:
>>> On Fri, Jul 3, 2015 at 8:16 PM, Rich Freeman
>>> <r-mythtv at thefreemanclan.net> wrote:
>>>>> ok, I'm still not sure what to do then. before I upgraded I was able
>>>>> to edit the table in an older version of phpmyadmin. another mythtv
>>>>> system I run, which is on the older phpmyadmin I can edit the table.
>>>>>
>>>>
>>>> I'd have to look up the syntax, but either add the primary key index
>>>> on the two columns, or just add a new autonumber field as the primary
>>>> key.  Neither should bother MythTV.  I'd think that you could do this
>>>> from phpmyadmin, actually (I don't think it should care about a
>>>> missing primary key when altering a table).
>>>>
>>>> --
>>>> Rich
>>>
>>> ok, I'll have to do some googling to see how to do that exactly. and
>>> of course perform a db backup just before...
>>
>> well I tried to make Value and Hostname columns "primary", and when I
>> launch mythbackend I get,
>>
>>
>> This version of MythTV requires an updated database. (schema is 5000
>> versions behind)
>>
>> Please run mythtv-setup or mythbackend to update your database.
>>
>> Database Host: 192.168.1.50
>> Database Name: mythconverg
>>
>> 2015-07-08 08:48:38.564100 I  Database connection created: DBManager0
>> 2015-07-08 08:48:38.564127 I  New DB connection, total: 1
>> 2015-07-08 08:48:38.567111 I  Connected to database 'mythconverg' at
>> host: 192.168.1.50
>> 2015-07-08 08:48:38.571742 I  Closing DB connection named 'DBManager0'
>> 2015-07-08 08:48:38.571912 I  Clearing Settings Cache.
>> 2015-07-08 08:48:38.571987 I  Database connection created: DBManager1
>> 2015-07-08 08:48:38.572002 I  New DB connection, total: 1
>> 2015-07-08 08:48:38.572683 I  Connected to database 'mythconverg' at
>> host: 192.168.1.50
>> 2015-07-08 08:48:38.575076 N  Setting QT default locale to en_US
>> 2015-07-08 08:48:38.575179 I  Current locale en_US
>> 2015-07-08 08:48:38.575247 N  Reading locale defaults from
>> /usr/share/mythtv//locales/en_us.xml
>> 2015-07-08 08:48:38.578582 E  DB Error (SaveSettingOnHost('FreqTable')
>> - query failure: ):
>> Query was:
>> INSERT INTO settings (value,data ) VALUES ( ?, ? );
>> Bindings were:
>> :DATA="us-bcast", :VALUE="FreqTable"
>> Driver error was [2/1062]:
>> QMYSQL3: Unable to execute statement
>> Database error was:
>> Duplicate entry 'FreqTable-' for key 'PRIMARY'
>>
>> 2015-07-08 08:48:38.580843 E  DB Error
>> (SaveSettingOnHost('ISO639Language0') - query failure: ):
>> Query was:
>> INSERT INTO settings (value,data ) VALUES ( ?, ? );
>> Bindings were:
>> :DATA="eng", :VALUE="ISO639Language0"
>> Driver error was [2/1062]:
>> QMYSQL3: Unable to execute statement
>> Database error was:
>> Duplicate entry 'ISO639Language0-' for key 'PRIMARY'
>>
>> 2015-07-08 08:48:38.582545 E  DB Error
>> (SaveSettingOnHost('ISO639Language1') - query failure: ):
>> Query was:
>> INSERT INTO settings (value,data ) VALUES ( ?, ? );
>> Bindings were:
>> :DATA="eng", :VALUE="ISO639Language1"
>> Driver error was [2/1062]:
>> QMYSQL3: Unable to execute statement
>> Database error was:
>> Duplicate entry 'ISO639Language1-' for key 'PRIMARY'
>>
>> 2015-07-08 08:48:38.584422 E  DB Error (SaveSettingOnHost('TVFormat')
>> - query failure: ):
>> Query was:
>> INSERT INTO settings (value,data ) VALUES ( ?, ? );
>> Bindings were:
>> :DATA="NTSC", :VALUE="TVFormat"
>> Driver error was [2/1062]:
>> QMYSQL3: Unable to execute statement
>> Database error was:
>> Duplicate entry 'TVFormat-' for key 'PRIMARY'
>>
>> 2015-07-08 08:48:38.586091 E  DB Error (SaveSettingOnHost('VbiFormat')
>> - query failure: ):
>> Query was:
>> INSERT INTO settings (value,data ) VALUES ( ?, ? );
>> Bindings were:
>> :DATA="NTSC Closed Caption", :VALUE="VbiFormat"
>> Driver error was [2/1062]:
>> QMYSQL3: Unable to execute statement
>> Database error was:
>> Duplicate entry 'VbiFormat-' for key 'PRIMARY'
>>
>> 2015-07-08 08:48:38.589283 I  Enabling Settings Cache.
>> 2015-07-08 08:48:38.589294 I  Clearing Settings Cache.
>> 2015-07-08 08:48:38.595992 I  Disabling Settings Cache.
>> 2015-07-08 08:48:38.596004 I  Clearing Settings Cache.
>> 2015-07-08 08:48:38.598036 I  No current database version?
>> 2015-07-08 08:48:38.602121 W  Not allowed to upgrade the database.
>> 2015-07-08 08:48:38.604437 I  Enabling Settings Cache.
>> 2015-07-08 08:48:38.604452 I  Clearing Settings Cache.
>> 2015-07-08 08:48:38.604844 E  Couldn't upgrade database to new schema
>> 2015-07-08 08:48:38.628782 I  Removing syslogging


> ran
> ALTER TABLE `mythconverg`.`settings`
> ADD COLUMN `id` INT NOT NULL AUTO_INCREMENT FIRST,
> ADD PRIMARY KEY (`id`);

> and all is well and good! (so far...)

Very possible you will run into trouble when you upgrade to 0.28

Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list