XBMC MySQL Library

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ageris Offline
Junior Member
Posts: 3
Joined: Apr 2012
Reputation: 0
Post: #1
Hi.

I'm trying to set up several instances of XBMC to use a shared library like this:
http://lifehacker.com/5634515/how-to-syn...-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?
find quote
vexation Offline
Senior Member
Posts: 164
Joined: Jul 2009
Reputation: 1
Post: #2
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.
(This post was last modified: 2012-04-07 20:08 by vexation.)
find quote
ageris Offline
Junior Member
Posts: 3
Joined: Apr 2012
Reputation: 0
Post: #3
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!
find quote
vexation Offline
Senior Member
Posts: 164
Joined: Jul 2009
Reputation: 1
Post: #4
(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..._libraries which worked perfectly just a few days ago.
find quote
ageris Offline
Junior Member
Posts: 3
Joined: Apr 2012
Reputation: 0
Post: #5
Oh ok. Awesome :-) I tried googling it, but I must have missed the official guide.
find quote
speedway Offline
Senior Member
Posts: 143
Joined: Feb 2005
Reputation: 0
Location: Belgium
Post: #6
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)?

Intel NUC BOXD34010WYK2 / Intel mSata 525 30GB / Kingston 8 GB / Intel 7260hmw
(This post was last modified: 2012-05-09 11:15 by speedway.)
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,990
Joined: Jan 2011
Reputation: 293
Location: Arizona, USA
Post: #7
Can you get us a full copy of the debug log?

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
speedway Offline
Senior Member
Posts: 143
Joined: Feb 2005
Reputation: 0
Location: Belgium
Post: #8
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.

Intel NUC BOXD34010WYK2 / Intel mSata 525 30GB / Kingston 8 GB / Intel 7260hmw
find quote
djbarney Offline
Junior Member
Posts: 42
Joined: Apr 2011
Reputation: 0
Post: #9
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
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #10
@djbarney: that issue has already been fixed - wait for the next nightly.

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: badge.gif]
find quote
djbarney Offline
Junior Member
Posts: 42
Joined: Apr 2011
Reputation: 0
Post: #11
(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/...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
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #12
1050 is "Table already exists". You have a half-screwed up database somewhere along the line (v63 perhaps).

Kill it using mysql.

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: badge.gif]
find quote
djbarney Offline
Junior Member
Posts: 42
Joined: Apr 2011
Reputation: 0
Post: #13
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!
find quote
speedway Offline
Senior Member
Posts: 143
Joined: Feb 2005
Reputation: 0
Location: Belgium
Post: #14
(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).

Intel NUC BOXD34010WYK2 / Intel mSata 525 30GB / Kingston 8 GB / Intel 7260hmw
find quote
Memphiz Offline
Team-Kodi Developer
Posts: 11,673
Joined: Feb 2011
Reputation: 116
Location: germany
Post: #15
Let XBMC update the DB to v63 don't mess around with it by yourself.

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
Post Reply