View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 10 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Jul 21, 2011 11:19 am 
Offline
Joined: Sat Apr 01, 2006 10:06 pm
Posts: 31
Location: Vancouver, WA
I am having an issue after upgrading to 6.04

I get a message when starting mythfrontend

Warning: MythTV wants to upgrade your database, for the Video Schema, from 1014 to 1038.

When I tell it to upgrade it doesn't complete. I get the following in my mythfrontend.log. It does the backup but not the schema upgrade. Is there a more manual way to do this?

edit: should I edit the mythvideo DB and remove the "videocast" table and try the upgrade again?

Update: removing the "videocast" table didn't work. I just ran into the next problem.

Code:
2011-07-21 09:57:38.498 Loading en_us translation for module mythmusic
2011-07-21 09:57:38.501 Loading en_us translation for module mythnetvision
2011-07-21 09:57:38.513 Error Loading en_us translation for module mythstream
2011-07-21 09:57:38.519 Current MythVideo Schema Version (mythvideo.DBSchemaVer): 1014
2011-07-21 09:57:38.519 MythVideo database schema is old. Waiting to see if DB is being upgraded.
2011-07-21 09:57:39.519 New DB connection, total: 2
2011-07-21 09:57:39.520 Connected to database 'mythconverg' at host: localhost
2011-07-21 09:57:39.523 Current MythVideo Schema Version (mythvideo.DBSchemaVer): 1014
2011-07-21 09:57:40.526 Current MythVideo Schema Version (mythvideo.DBSchemaVer): 1014
2011-07-21 09:57:41.529 Current MythVideo Schema Version (mythvideo.DBSchemaVer): 1014
2011-07-21 09:57:41.529 Timed out waiting.
2011-07-21 09:57:41.549 Backing up database with script: '/usr/share/mythtv/mythconverg_backup.pl'
2011-07-21 09:57:53.601 Database Backup complete.
2011-07-21 09:57:53.601 Backed up database to file: '/myth/backup/mythconverg-1264-20110721095741.sql.gz'
2011-07-21 10:25:14.339 Upgrading to MythVideo schema version 1015
2011-07-21 10:25:14.340 DB Error (performActualUpdate):
Query was:

Driver error was [2/1050]:
QMYSQL3: Unable to execute statement
Database error was:
Table 'videocast' already exists

2011-07-21 10:25:14.340 Couldn't upgrade video database schema, exiting.
2011-07-21 10:25:14.340 Unable to initialize plugin 'mythvideo'.
2011-07-21 10:25:14.352 SourceManager: NeedSourceFor: Unable to find source for 10, KVUO, 1
2011-07-21 10:25:14.352 SourceManager: NeedSourceFor: Unable to find source for 8, +45.37,-122.39, 1
2011-07-21 10:25:14.352 SourceManager: NeedSourceFor: Unable to find source for 7, +45.37,-122.39, 1
2011-07-21 10:25:14.353 Loading en_us translation for module mythweather
2011-07-21 10:25:14.354 NetworkControl: Listening for remote connections on port 6546
2011-07-21 10:25:14.494 Found mainmenu.xml for theme 'Terra'
2011-07-21 10:25:15.022 MythCoreContext: Connecting to backend server: 10.0.5.50:6543 (try 1 of 1)
2011-07-21 10:25:15.023 Using protocol version 63



Here are my current schema versions:

Code:
# mysql mythconverg
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 209
Server version: 5.0.75 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select value, data from settings where value like '%schema%';
+-----------------------+------+
| value                 | data |
+-----------------------+------+
| DBSchemaVer           | 1264 |
| ArchiveDBSchemaVer    | 1005 |
| FlixDBSchemaVer       | 1004 |
| GalleryDBSchemaVer    | 1003 |
| GameDBSchemaVer       | 1017 |
| MusicDBSchemaVer      | 1017 |
| PhoneDBSchemaVer      | 1001 |
| mythvideo.DBSchemaVer | 1014 |
| WeatherDBSchemaVer    | 1005 |
| WebDBSchemaVer        | 2    |
| BrowserDBSchemaVer    | 1002 |
| NewsDBSchemaVer       | 1001 |
| NetvisionDBSchemaVer  | 1004 |
+-----------------------+------+
13 rows in set (0.00 sec)

_________________
LinHES 7.4
FE/BE - Athlon 64 X2 4200 - Foxconn WinFast 6150K8MA-8EKRS - LeadTek PX6200 TC-64 - 2 GB RAM - 30 GB SSD - 1.5 TB HD - 3 x HDHomeRun
2x FE - Foxconn NT300i Atom 330 1.6 GHz / Ion - 2 GB RAM


Last edited by cullenp on Thu Jul 28, 2011 10:06 am, edited 1 time in total.


Top
 Profile  
 
PostPosted: Wed Jul 27, 2011 1:16 am 
Offline
Joined: Sat Apr 01, 2006 10:06 pm
Posts: 31
Location: Vancouver, WA
I followed some instructions to backup the database

Code:
# /usr/share/mythtv/mythconverg_backup.pl --verbose


Dropit

Code:
mysql> DROP DATABASE IF EXISTS mythconverg;


then create it a new

Code:
mysql -u root < /usr/share/mythtv/database/mc.sql


and restore

Code:
/usr/share/mythtv/mythconverg_restore.pl --filename=mythconverg-1264-20110726230438.sql.gz --verbose


But I end up in the same boat. mythvideo is still not working and the database is not upgraded to the new schema

Any help would be greatly appreciated.

Thanks

_________________
LinHES 7.4
FE/BE - Athlon 64 X2 4200 - Foxconn WinFast 6150K8MA-8EKRS - LeadTek PX6200 TC-64 - 2 GB RAM - 30 GB SSD - 1.5 TB HD - 3 x HDHomeRun
2x FE - Foxconn NT300i Atom 330 1.6 GHz / Ion - 2 GB RAM


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2011 7:09 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Since the automatic schema upgrade is built into MythTV the LinHES developers can't really do much about it. After repeatedly running into similar problems with the database upgrade on my test system, I ended up doing a fresh install and selective import to upgrade the production system. There's a thread around somewhere where I coached someone through the process.

This is the thread I meant: http://mysettopbox.tv/phpBB2/viewtopic.php?t=22098
I'd recommend reading the whole thing for context, and using the bash script from Sun May 15, 2011 9:51 am to generate a pair of SQL files for the import data from your backup.


Last edited by tjc on Wed Jul 27, 2011 11:37 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2011 9:08 am 
Offline
Joined: Sat Apr 01, 2006 10:06 pm
Posts: 31
Location: Vancouver, WA
Thanks for the reply I was beginning to worry that no one had been through the same thing. If you could find your post that would be very helpful. I'll do a search myself. My next step is to attempt a selective import.

Did you say you had issues with the mythvideo plugin initializing too? Or do you think those spawn from the DB issues?

I found these posts could you direct me to the one you were referring:

http://mysettopbox.tv/phpBB2/viewtopic.php?t=14331

http://mysettopbox.tv/phpBB2/viewtopic.php?t=18480

_________________
LinHES 7.4
FE/BE - Athlon 64 X2 4200 - Foxconn WinFast 6150K8MA-8EKRS - LeadTek PX6200 TC-64 - 2 GB RAM - 30 GB SSD - 1.5 TB HD - 3 x HDHomeRun
2x FE - Foxconn NT300i Atom 330 1.6 GHz / Ion - 2 GB RAM


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2011 3:43 pm 
Offline
Joined: Sat Feb 03, 2007 12:52 am
Posts: 187
Location: Manitoba, Canada
I think this one is the most recent.
http://mysettopbox.tv/phpBB2/viewtopic.php?t=22098

Another option is to manually upgrade your DB schema.
https://github.com/MythTV/mythtv/blob/v0.24.1/mythplugins/mythvideo/mythvideo/dbcheck.cpp
Your current version is showing 1014. Start with lines 788-793, then update your mythvideo.DBSchemaVer to 1015 in the settings table. Restart the front end and see if it completes the update from 1015 to 1038.

Of course, make a backup before you start just in case.

Good luck.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2011 11:40 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
OBTW - That script is for upgrading from R5.5 to R6.04. If you're upgrading from a more recent version the SQL updates could be different.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2011 10:02 am 
Offline
Joined: Sat Apr 01, 2006 10:06 pm
Posts: 31
Location: Vancouver, WA
Thanks tjc and goofee,

It worked!!

I think my schema had all the changes up to 1030 but the schema version value was wrong.

I backed up and reviewed the lines starting at 788:
https://github.com/MythTV/mythtv/blob/v ... bcheck.cpp

I made the changes stepwise from 1014 to 1030 then it automatically handled the update to 1038

Here are the details for those who wish to know(no warranty YMMV):

Make a backup!

Code:
# /usr/share/mythtv/mythconverg_backup.pl


Make a copy of the resultant mythconverg*.sql.gz file and store it in another directory because the following steps will make backups that could overwrite this file.

I did this remotely so that I could monitor the log, see the dbcheck.cpp webpage and make changes to the SQL with an SQL management application(I used Sequel Pro on the Mac - free)

Monitor the mythfrontend log

Code:
# tail -f /var/log/mythfrontend.log


Attach to the mythconverg database using an SQL database management tool and find the value of mythvideo.DBSchemaVer in the settings table.

stop the backend

Code:
# sv stop mythbackend


In the frontend log you will see in my first post:

Code:
2011-07-21 09:57:53.601 Backed up database to file: '/myth/backup/mythconverg-1264-20110721095741.sql.gz'
2011-07-21 10:25:14.339 Upgrading to MythVideo schema version 1015
2011-07-21 10:25:14.340 DB Error (performActualUpdate):
Query was:

Driver error was [2/1050]:
QMYSQL3: Unable to execute statement
Database error was:
Table 'videocast' already exists


Find the lines on the webpage for dbcheck.cpp that both reflects the schema version and the videocast table entry. It looks some thing like this:

Code:
        if (dbver == "1014")
        {
            // Add Cast tables
            const QString updates[] = {
"CREATE TABLE videocast ("
    "intid INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,"
    "cast VARCHAR(128) NOT NULL);",
"CREATE TABLE videometadatacast ("
        "idvideo INT UNSIGNED NOT NULL,"
        "idcast INT UNSIGNED NOT NULL);",
""
            };


This update failed because the DB already had the tables added, but the schema version was not incremented. So use your SQL management application to increment the mythvideo.DBSchemaVer value in the settings table from(in my case) 1014 to 1015.

Next start the backend and restart the frontend. It will prompt you to update the mythvideovideo schema, do it and check the frontend log and it should give you the next error. I repeated these steps until I got to mythvideo.DBSchemaVer value 1030 and at that time the updates to the mythvideo DB happened automatically and were visible in the mythfrontend log.

I'm very happily up and running again.

Many thanks!

_________________
LinHES 7.4
FE/BE - Athlon 64 X2 4200 - Foxconn WinFast 6150K8MA-8EKRS - LeadTek PX6200 TC-64 - 2 GB RAM - 30 GB SSD - 1.5 TB HD - 3 x HDHomeRun
2x FE - Foxconn NT300i Atom 330 1.6 GHz / Ion - 2 GB RAM


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 23, 2012 12:32 am 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
this might be my fix

_________________
My System


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 8:31 am 
Offline
Joined: Wed Mar 21, 2012 7:59 am
Posts: 63
Thanks for posting this, I am having the same problem, Mythtv wants to update schema from 1014 to 1038. The strange thing is that I had a fresh install of 7.2, so not sure why this happened.

I am ok with linux, but still kind of a noob. I understand all the steps out outline below, but I have never edited mysql or mythconverg. Can someone please tell me how to how to edit the file locally? Again, have not worked with mysql, just nano. Not even sure you to get into the correct file.

Thanks!


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 3:11 pm 
Offline
Joined: Wed Mar 21, 2012 7:59 am
Posts: 63
Ok I figured out a fix. Just followed the directions on this website:

http://www.mythtv.org/pipermail/mythtv- ... 69527.html

I am thinking this all happend to me because I did a copy-paste of my old video folder from a prior mythtv system. Anyway, its fixed now.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu