[mythtv-users] videometadata restore error and schema

Michael T. Dean mtdean at thirdcontact.com
Wed Jan 28 20:32:36 UTC 2009

On 01/28/2009 02:35 PM, Captain Krypto wrote:
> On Wed, Jan 28, 2009 at 2:11 PM, Nick Rout wrote:
>> On Thu, Jan 29, 2009 at 7:22 AM, Brad DerManouelian wrote:
>>> On Jan 28, 2009, at 10:11 AM, Captain Krypto wrote:
>>>> I am a dumb dumb and accidently dropped my videometadata table from
>>>> mythconverg.
>>>> I was trying to restore it from a recent backup and I get the following
>>>> error when running the command:
>>>> mysql -u mythtv -pmythtv mythconverg < videometadata.sql
>>>> ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check
>>>> the manual that corresponds to your MySQL server version for the right
>>>> syntax to use near 'LOCK TABLES `videometadata` WRITE' at line 3
>>>> With the code in question being:
>>>> -- Table structure for table `videometadata`
>>>> DROP TABLE IF EXISTS `videometadata`;
>>>> CREATE TABLE `videometadata` (
>>>> -- Dumping data for table `videometadata`
>>>> LOCK TABLES `videometadata` WRITE;
>>>> /*!40000 ALTER TABLE `videometadata` DISABLE KEYS */;
>>>> INSERT INTO `videometadata` (`intid`, [...]
>>>> Does anyone know what the issue with that is?
>>> Yeah, you're completely missing the table definition. Mine looks like this (but don't go by it because I'm running trunk and might have a different schema for this table):
>> the OP said he grepped the whole database backup (mythtv_backup.sql)
>> for just the parts that say 'Insert into videometadata' - in doing so
>> he missed the table definition. If he looks at his mythtv_backup.sql
>> file he should find the table definition relevant for his version.
> Yes, I was completely missing the table definition.  I found the relevant
> part of the script in mythtv_backup.sql and I was able to recreate a blank
> table.  However, when I tried to run imdb-bulk-update.pl it failed without
> an error.  Also, I am no longer able to see a video icon in mythweb, and the
> video link gives me "An unknown module was specified"... perhaps I need to
> restart mythbackend?
> Ugh...  I'm at work now, but I'll have to look more into it when I get
> home.  Don't mess with things when you are hungover ;)

To get the appropriate data for the channel, you probably did something 
like: http://www.mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7 .  Note 
that the approach is broken as described at 
http://svn.mythtv.org/trac/ticket/3762#comment:8 , so make sure you get 
that info first, then the table definition, then the data (INSERTs).


More information about the mythtv-users mailing list