[mythtv-users] Re: help with mysql database

Don Brett dlbrett at zoominternet.net
Fri Nov 12 19:15:14 UTC 2004


> Hi all, Ive been following the MythTv howto from mythtv.org and have
> sucessfully managed to install everything, the only problem i have
> currently is with mysql database, everytime i try to add channels via
> mythtv-setup (using XMLTV) i get the following error at the end:
>
>
> DB Error (simpledbstorage update):
> Query was:
> INSERT INTO videosource SET sourceid = 0, freqtable = 'default';
> Driver error was [2/1062]:
> QMYSQL3: Unable to execute query
> Database error was:
> Duplicate entry '' for key 2
>
>
> I ran mysql admin and checked the database, there is no duplicate
entry
> (in fact the database is empty) so im a bit stumped with this, any
help
> appreciated.

I don't use XMLTV, so I havn't seen this problem, but, if I'm reading it
correctly:

1. INSERT INTO videosource SET sourceid = 0, freqtable = 'default';
- It's rejecting the scripts attempt to write default values into the
videosource table everywhere that sourceid=0

2. Duplicate entry '' for key 2
- It already has a blank entry for key 2?

Did mythfilldatabase work correctly?  It sounds like it's trying to
initialize the videosource table, but they're not created correctly?

Don't know if it's of any help, but here's what mine looks like:

mysql> SHOW KEYS FROM `videosource`;
+-------------+------------+----------+--------------+-------------+-----------+

| Table       | Non_unique | Key_name | Seq_in_index | Column_name |
Collation |
+-------------+------------+----------+--------------+-------------+-----------+

| videosource |          0 | PRIMARY  |            1 | sourceid    |
A         |
| videosource |          0 | name     |            1 | name        |
A         |
+-------------+------------+----------+--------------+-------------+-----------+

2 rows in set (0.00 sec)

Good luck,
Don

PS - I'd be tempted to dump the database and re-initialize it.  But, it
would wipe out your entire setup!!!

#mysql -uroot -pyourpassword

mysql>drop database mythconverg;
mysql>quit;   to exit client

, then run mythfilldatabase





More information about the mythtv-users mailing list