Upgrading from FroDo to Gotham - MYSQL Issues
#1
Hi All,

Here's some background on my setup:

Primary client: HTPC running Windows 7 with XBMC 12.3 Frodo
-All downloads are done via this box

Secondary clients: RaspBMC, Android clients, OSX client all running Frodo

Database: MYSQL hosted on my NAS which runs UnRAID

So I've been running Frodo 12.x on all of my clients. Last night I had to power cycle my RaspBMC box and it auto-updated to Gotham. The reason I had not upgraded any other clients to Gotham yet is because my testing with it on Android and Windows 8.1 showed that it would not ever read my MYSQL data even after putting the AdvancedSettings.xml file in the correct locations. So now that my RaspBMC client upgraded by itself, I cannot use it.

I've been trying to Google the crap out of this issue for a while now and yielded limited results. I've read that it may be a problem with the DB not being upgraded to a Gotham compatible version? Does that mean that I need to make a backup of my library via my Windows 7 client and then run the Gotham installer on that box? Will it automatically upgrade the MYSQL DB?

Is that not the problem at all? I appreciate any help you all can provide. Please let me know if any other information is required from my part.

Thank You!

@Mods: If I've placed this in the wrong forum, please move it.
Reply
#2
Get a Debug Log
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
(2014-07-19, 04:04)jmarshall Wrote: Get a Debug Log

Hi,

Thank you for your reply. Please see the link below to the log file from the Raspberry Pi unit that was upgraded to Gotham as noted in the OP.

http://xbmclogs.com/show.php?id=250989

Please let me know if any other information is required. I appreciate your help!
Reply
#4
Also, here is a copy of my advancedsettings.xml file which I just confirmed still exists on the RPi box in /home/pi/.xbmc/userdata

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.1.33</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>192.168.1.33</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>

<videolibrary>
<importwatchedstate>true</importwatchedstate>
</videolibrary>
</advancedsettings>
Reply
#5
I have had the same issue - tried to upgrade both PC and Pi to Gotham (and have posted elsewhere in forum with debug logs etc).

The MySQL databases get created and populated from the Frodo version, but something is failing with the views and triggers - they don't get created.

So i'm back on Frodo for now. Might try again this weekend.
QNAP TS670 NAS - 4x4TB Raided with NFS Support & Central MySQL DB
Pi 3 [Xbian] - Samsung 46" ES7000 Smart TV & HT-E5550 3D BD Sound System
Pi 3 [Xbian]  + Hyperion Ambilight- Samsung 48" Curved UE48JS9000 4k
PowerEthernet T1502 Powerline adapters
Reply
#6
(2014-07-21, 14:13)nsviper Wrote: I have had the same issue - tried to upgrade both PC and Pi to Gotham (and have posted elsewhere in forum with debug logs etc).

The MySQL databases get created and populated from the Frodo version, but something is failing with the views and triggers - they don't get created.

So i'm back on Frodo for now. Might try again this weekend.

I browsed through the MYSQL folder on my NAS yesterday and saw the MyVideos78 folder does exist alongside the 75. The XBMC clients just don't read anything from them.

I'm very stumped.
Reply
#7
Well, according to your log,
Code:
Mysql execute: ALTER TABLE settings ADD StereoMode integer
21:31:59 T:3036958720   ERROR: SQL: Undefined MySQL error: Code (1060)
                                            Query: ALTER TABLE settings ADD StereoMode integer
21:31:59 T:3036958720   ERROR: Exception updating database MyVideos78 from version 75 to 78
21:31:59 T:3036958720   ERROR: Error updating database MyVideos78 from version 75 to 78
21:31:59 T:3036958720   DEBUG: Mysql rollback transaction

Which is why it doesn't update. 1060 is duplicate column, which may mean that StereoMode already exists in the settings table. I don't have that version anymore to check though.

You could, as a work around, export the library, move the database out of the MySQL path (in case of issues) and then import it all back in, which should put everything back, but in the new db. If it doesn't work, copy the old database back, and you have lost no data.
Learning Linux the hard way !!
Reply
#8
(2014-07-21, 17:11)black_eagle Wrote: Well, according to your log,
Code:
Mysql execute: ALTER TABLE settings ADD StereoMode integer
21:31:59 T:3036958720   ERROR: SQL: Undefined MySQL error: Code (1060)
                                            Query: ALTER TABLE settings ADD StereoMode integer
21:31:59 T:3036958720   ERROR: Exception updating database MyVideos78 from version 75 to 78
21:31:59 T:3036958720   ERROR: Error updating database MyVideos78 from version 75 to 78
21:31:59 T:3036958720   DEBUG: Mysql rollback transaction

Which is why it doesn't update. 1060 is duplicate column, which may mean that StereoMode already exists in the settings table. I don't have that version anymore to check though.

You could, as a work around, export the library, move the database out of the MySQL path (in case of issues) and then import it all back in, which should put everything back, but in the new db. If it doesn't work, copy the old database back, and you have lost no data.

Hi,

Thanks for the response. Some of that is above my head. I would have to export the library from a working Frodo client?

What you do you mean by move the DB out of the MySQL path? Would I then import the library back into a Gotham client?

Thank you!
Reply
#9
Yeah, you would have to export from a working Frodo client. You can either export to one file, or multiple files.

By moving the db, I meant that when you said "I browsed through the MYSQL folder on my NAS yesterday and saw the MyVideos78 folder does exist alongside the 75.", you should cut/paste the 75 (after the export) to somewhere safe (not in the MYSQL folder). When you start a Gotham client, it will then not find a database to upgrade, and will create a new one from scratch. You then either import the library by selecting the exported file (if you exported to one file) or by setting your content again, but using Gothams 'local info only' scraper, which will read the individual files previously exported and rebuild the library using them.

In the event that something goes badly wrong (eg power cut) you will still have a fully working MyVideos75 stored somewhere that you can copy back to the mysql folder on your NAS and still be able to access it with Frodo.

Be aware that once one Gotham client has completed the library import, all your other clients will need updating to the same version of Gotham to be able to use the shared db.
Learning Linux the hard way !!
Reply
#10
(2014-07-21, 17:57)black_eagle Wrote: Yeah, you would have to export from a working Frodo client. You can either export to one file, or multiple files.

By moving the db, I meant that when you said "I browsed through the MYSQL folder on my NAS yesterday and saw the MyVideos78 folder does exist alongside the 75.", you should cut/paste the 75 (after the export) to somewhere safe (not in the MYSQL folder). When you start a Gotham client, it will then not find a database to upgrade, and will create a new one from scratch. You then either import the library by selecting the exported file (if you exported to one file) or by setting your content again, but using Gothams 'local info only' scraper, which will read the individual files previously exported and rebuild the library using them.

In the event that something goes badly wrong (eg power cut) you will still have a fully working MyVideos75 stored somewhere that you can copy back to the mysql folder on your NAS and still be able to access it with Frodo.

Be aware that once one Gotham client has completed the library import, all your other clients will need updating to the same version of Gotham to be able to use the shared db.

Ah, that's pretty clear. Just one more question, once I cut/paste the 75 folder elsewhere, you said the Gotham client will create a new DB from scratch. What happens to the current 78 folder that already exists? Do I have to remove that too?
Reply
#11
Ah, that's a good question. In all honesty, I don't know, but my gut feeling would be to remove it yes. That should avoid any issues with tables etc being only part created or otherwise in a damaged/unusable state.

Edit - further info in the wiki under exporting (wiki)
Learning Linux the hard way !!
Reply
#12
(2014-07-21, 18:05)black_eagle Wrote: Ah, that's a good question. In all honesty, I don't know, but my gut feeling would be to remove it yes. That should avoid any issues with tables etc being only part created or otherwise in a damaged/unusable state.

Edit - further info in the wiki under exporting (wiki)

Thank you. I'll tackle this the first chance I get and report back. I appreciate your assistance.
Reply
#13
I ended up:

Exporting library from Frodo with watched flags
Delete music and video databases
Run Gotham on Pi, this created blank databases but at least the views and triggers were created
Added my sources back in and told to scan local files info only

Currently its reimporting all my stuff to the new databases

Once i'm happy its working ok, will upgrade my 2nd Pi to XBian with Gotham...
QNAP TS670 NAS - 4x4TB Raided with NFS Support & Central MySQL DB
Pi 3 [Xbian] - Samsung 46" ES7000 Smart TV & HT-E5550 3D BD Sound System
Pi 3 [Xbian]  + Hyperion Ambilight- Samsung 48" Curved UE48JS9000 4k
PowerEthernet T1502 Powerline adapters
Reply
#14
Well I had an unexpected turn of events. I had to reboot my Windows 7 HTPC today (first time after the RPi updated to Gotham) and now when I try to launch XBMC it crashes upon launch when it shows the XBMC logo with the message: "ERROR: Unable to Initialize: Exiting"

It crashes on OSX as well.

FML. I really hope I didn't just lose my library.
Reply
#15
As long as you have a copy of MyVideos75 and a working Frodo your library is intact. In fact, if you have exported it like nsviper, all the library info is alongside the movies, waiting to be re-scraped back in.

As to the error you now get, I'd be checking any windows updates and rolling them back.
Learning Linux the hard way !!
Reply

Logout Mark Read Team Forum Stats Members Help
Upgrading from FroDo to Gotham - MYSQL Issues0