Kodi Community Forum
XBMC MySQL Library - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: XBMC MySQL Library (/showthread.php?tid=128107)

Pages: 1 2 3 4 5


XBMC MySQL Library - ageris - 2012-04-07

Hi.

I'm trying to set up several instances of XBMC to use a shared library like this:
http://lifehacker.com/5634515/how-to-synchronize-your-xbmc-media-center-across-every-room-in-the-house

Unfortunately I'm unable to get it to work. It seems xbmc cannot connect to the mysql database. As far as I can tell I have everything set up correctly though there is obviously something I've missed.

Here is my setup:

Server:
OS: Windows Server 2008 r2
This contains all media as well as the MySQL server instance

Client1:
OS: Ubuntu 10.10 x32
Can connect to the mysql database using the terminal client and the xbmc user name and password I specified. I'm also able to create and modify tables using the xbmc user.

Client2:
OS: Windows 7 x64
Can connect using SQLWave client on the correct port using the correct user name and password. I'm also able to modify the databases from here.

The log on both machines has got a ton of entries like this:
18:40:23 T:5848 ERROR: Unable to open database: xbmc_video# [2003](Can't connect to MySQL server on '192.168.0.112' (10055))
where # is a number.

They both also contain an entry like this (both for video and music):
18:40:23 T:5848 ERROR: Unable to open database: xbmc_video [2003](Can't connect to MySQL server on '192.168.0.112' (10055))

What am I missing?


RE: XBMC MySQL Library - vexation - 2012-04-07

I suspect you're specifying xbmc_video in advancedsettings.xml - this isn't necessary anymore, just remove that entire line if you see it and see how you get on (the actual database name depends on the version of xbmc now.. i.e in Eden the database name is actually 'myvideos60' - but you shouldn't need to specify this in advancedsettings.xml)

Oh, just looked at the guide you referenced.. it's out of date.
Just remove '<name>xbmc_video</name>' and '<name>xbmc_music</name>' from your advancedsettings.xml file - should fix you up.


RE: XBMC MySQL Library - ageris - 2012-04-07

Ok. So I simply need to make two databases named 'myvideos60' and 'mymusic60' and remove the 'name' entry from the xml? I'll try that when I get home. Thanks for the tip!


RE: XBMC MySQL Library - vexation - 2012-04-07

(2012-04-07, 20:10)ageris Wrote: Ok. So I simply need to make two databases named 'myvideos60' and 'mymusic60' and remove the 'name' entry from the xml? I'll try that when I get home. Thanks for the tip!

The databases in Eden are mymusic18 and myvideos60 - but the important thing is that Eden will handle all of that automatically, just remove the entries from advancedsettings.xml and let XBMC handle the rest.. it will create the databases as needed depending on what version of XBMC you are using (i.e if you updated to a nightly build after Eden, it may create a new DB called myvideos65, removing the nightly and going back to Eden it will automatically go back to using myvideos60 etc etc)

I followed the official XBMC guide at http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries which worked perfectly just a few days ago.


RE: XBMC MySQL Library - ageris - 2012-04-07

Oh ok. Awesome :-) I tried googling it, but I must have missed the official guide.


RE: XBMC MySQL Library - speedway - 2012-05-08

Hi,

I've update my Eden to 12.0 (nightly build) and get an error when using the same advancedsettings.xml.
It seems like xbmc wants to update to myvideos63 but fails:

16:44:06 T:7720 NOTICE: Attempting to update the database MyVideos63 from version 60 to 63
16:44:06 T:7720 DEBUG: Mysql Start transaction
16:44:06 T:7720 DEBUG: Mysql execute: ALTER TABLE path ADD dateAdded text
16:44:06 T:7720 ERROR: SQL: Undefined MySQL error: Code (1060)
Query: ALTER TABLE path ADD dateAdded text
16:44:06 T:7720 ERROR: Error attempting to update the database version!
16:44:06 T:7720 DEBUG: Mysql rollback transaction
16:44:06 T:7720 ERROR: Can't update the database MyVideos63 from version 60 to 63
16:44:06 T:7720 ERROR: Unable to open database: MyVideos62 [1049](Unknown database 'MyVideos62')
16:44:06 T:7720 ERROR: Unable to open database: MyVideos61 [1049](Unknown database 'MyVideos61')

In my MySQL I onlyy have MyVideos60. Is it because I jumped to roughly to a new build (so the update to 61 & 62 never took place and going from 60 to 63 isn't possible)?


RE: XBMC MySQL Library - Ned Scott - 2012-05-08

Can you get us a full copy of the debug log (wiki)?


RE: XBMC MySQL Library - speedway - 2012-05-08

Hi,

debug info is available: http://xbmclogs.com/show.php?id=2362&hash=36497117
SInce it is my first time I use this I've selected private, so password = debug (sorry for inconvenience).

Thanks for looking at it.


RE: XBMC MySQL Library - djbarney - 2012-05-08

Hi Ned,

I seem to have run into the same issue here going from nightly build 06 or 07 april to the current 08 april version. Debug Log has been sanitized and posted at http://xbmclogs.com/show.php?id=2366 . My library appears empty now. The reason why I "named" the database in MySQL and the advancedsettings is because i've got multiple devices setup with xbmc, with multiple users having their own profile and database stored in MySQL. Each user has their own settings which reference their own database, as I do like to play around with newer versions, but still want to be able to run older/stable versions on different hardware. If there's anything else i can provide that could be of help in this, let me know Smile


RE: XBMC MySQL Library - jmarshall - 2012-05-09

@djbarney: that issue has already been fixed - wait for the next nightly.


RE: XBMC MySQL Library - djbarney - 2012-05-09

(2012-05-09, 03:26)jmarshall Wrote: @djbarney: that issue has already been fixed - wait for the next nightly.

Hi jmarshall,

Would that be the 09 may version that is currently available? I installed the currently newest http://mirrors.xbmc.org/nightlies/win32/XBMCSetup-20120509-04c105e-master.exe nightly, which still results in similar errors and an empty library here. I've included the newest log for you at : http://xbmclogs.com/show.php?id=2388


RE: XBMC MySQL Library - jmarshall - 2012-05-10

1050 is "Table already exists". You have a half-screwed up database somewhere along the line (v63 perhaps).

Kill it using mysql.


RE: XBMC MySQL Library - djbarney - 2012-05-10

Alright jmarshall, thanks for the info Smile installed the latest version and deleted the messed up v63 database (still had 61 in mysql anyways) and that fixed it. Thanks! This is exactly why i love XBMC and the ppl behind it, keep being awesome!


RE: XBMC MySQL Library - speedway - 2012-05-11

(2012-05-10, 23:17)djbarney Wrote: Alright jmarshall, thanks for the info Smile installed the latest version and deleted the messed up v63 database (still had 61 in mysql anyways) and that fixed it. Thanks! This is exactly why i love XBMC and the ppl behind it, keep being awesome!

Hi,

Is your pathsubstitution still working under the latest nightly build?
I've first exported my original MySQL video database (MyVideos60), deleted it afterwards, booted XBMC nightly -> creating MyVideos63.
Within PHPMyAdmin I've deleted all views and succesfully imported the MyVideos60. Booting XBMC bring all movies and TV-series back, but no thumbs/Fanart any more.
I didn't changed the pathsubstitution which was working under Eden (Stable).


RE: XBMC MySQL Library - Memphiz - 2012-05-11

Let XBMC update the DB to v63 don't mess around with it by yourself.