Jump to content
hernandito

HowTo: Centralize Your XBMC Library with MySQL

195 posts in this topic Last Reply

Recommended Posts

I have a question about using both Mac and PC XBMC systems with this setup - if my library was setup on a Mac with all of my Unraid drives mounted (so their paths are something like /Volumes/MoviesHD/), will my library still work (after exporting it then reimporting it into mySQL) on a Windows or openelc XBMC box?

 

Thanks in advance. 

Share this post


Link to post

I have a question about using both Mac and PC XBMC systems with this setup - if my library was setup on a Mac with all of my Unraid drives mounted (so their paths are something like /Volumes/MoviesHD/), will my library still work (after exporting it then reimporting it into mySQL) on a Windows or openelc XBMC box?

 

Thanks in advance.

 

HI,

 

I don't think so

you will need to use a platform which can be read by all...

i use samba

you can protect things though as xbmc allows you to add network passwords ....

 

i even put my playlists and sources xml files on my unraid with path substitution so all xbmc instances use the same sources and olaylists ...  easier that way only 1 file to change ... :)

Share this post


Link to post

I have setup MySQL, and put the advancedsettings.xml file onto my OpenElec box.

 

When I go to add my video source, the source appears to add, but it doesn't scrape anything.  I can go to the files and see the contents of my data source, but nothing gets scraped.

 

What could the issue be?

Share this post


Link to post

I have setup MySQL, and put the advancedsettings.xml file onto my OpenElec box.

 

When I go to add my video source, the source appears to add, but it doesn't scrape anything.  I can go to the files and see the contents of my data source, but nothing gets scraped.

 

What could the issue be?

Did you try @CHBMB solution and create a an autostart.sh in smb://YOUR XBMC IP ADDRESS/configfiles/?  I was having trouble with an openelec gotham that boots too fast off a usb3 stick and this fixed it.

 

#!/bin/sh
ifconfig eth0 up
ifconfig eth0 PUT XBMC MACHINE IP ADDRESS HERE
route add default gw PUT ROUTER IP ADDRESS HERE

Share this post


Link to post

I have setup MySQL, and put the advancedsettings.xml file onto my OpenElec box.

 

When I go to add my video source, the source appears to add, but it doesn't scrape anything.  I can go to the files and see the contents of my data source, but nothing gets scraped.

 

What could the issue be?

 

sources i..e the things that XBMC scrapes are not stored in mysql but in the sources.xml file

Share this post


Link to post

I see a lot of people saying mysql shouldn't be installed in usb drive.  I just used the mysql plugin, and don't know where it installed mysql.  Since I had an earlier post of thumbnails not showing up, will someone share how to check where mysql is installed?  What is the command that should be issued?  I'd like to check.

Share this post


Link to post

Hello. 

 

I've followed the installation step by step.  What follows is I don't have thumbnails on my TV even if I've deleted the sources, and re-scraped everything.  Newly added shows have the fanart and posters.  Old shows that are already existing on the folder are not shown with fanart and posters.  I'm using windows 7 64-bit.  On the other hand, another streamer is using Openelec, and thumbnails are all ok.  Watched/ resume status is functioning well.  How do I troubleshoot this? 

 

 

Share this post


Link to post

Hello All,

 

I wonder why different XBMC machines of mine create their own database?  XBMC1 creates MyVideos75, XBMC2 creates MyVideos7575, etc.  I have 3 of them. 

 

End result is they don't resume where the other left off.

 

Please help.

Share this post


Link to post

sounds like a problem with your advancedsettings.xml files on one of the systems. Can you confirm those are configured as per the original post?

 

the '75' at the end of the database name, is put there automatically, and doesnt need to be specified in the settings file

 

Ive a feeling you've got one set to <name>MyVideos</name> (which is fine) and another set to <name>MyVideos75</name> or the like

 

 

Share this post


Link to post

Steps I did to isolate:

 

1. Made sure both XBMC machines share the same advancedsettings.xml, without <name>XXXX</name> on the xml file.

2. Deleted mysql database, all those unwanted ones, e.g. MyVideos75, MyVideos7578, etc.

3. Restarted XBMC (Frodo, Openelec), MyVideos75 was instantly created.

4. Powered on my Windows 7 XBMC (Gotham), MyVideos78 was instantly created.

 

Please help.

Share this post


Link to post

Steps I did to isolate:

 

1. Made sure both XBMC machines share the same advancedsettings.xml, without <name>XXXX</name> on the xml file.

2. Deleted mysql database, all those unwanted ones, e.g. MyVideos75, MyVideos7578, etc.

3. Restarted XBMC (Frodo, Openelec), MyVideos75 was instantly created.

4. Powered on my Windows 7 XBMC (Gotham), MyVideos78 was instantly created.

 

Please help.

Can you post what your advancesettings.xml contains for all instances of XBMC that you are running?  Also another thing is that if you want to share the mysql database between all XBMC instances then they all need to be on the same version or a version that runs the same database number.  See here.  In other words, you won't be able to share the database between Gotham and Frodo.

Share this post


Link to post

Yep, thats the issue alright

 

the number at the end is a versioning number afaik. So different versions of xbmc create different databases, with an incremented number appended

 

You're gonna need to get all instances to the same version of xbmc Im afraid

Share this post


Link to post

<advancedsettings>

<videodatabase>

<type>mysql</type>

<host>192.168.1.103</host>

<port>3306</port>

<user>xbmc</user>

<pass>xbmc</pass>

</videodatabase>

<musicdatabase>

<type>mysql</type>

<host>192.168.1.103</host>

<port>3306</port>

<user>xbmc</user>

<pass>xbmc</pass>

</musicdatabase>

</advancedsettings>

 

 

But I guess it's pretty useless now :-)  Thanks for the diagnosis guys.

Share this post


Link to post

You probably spotted it, and makes diagnosing a confusing at first, but when you started up the Gotham version, I believe it copies the *75 database to *78. So had you scraped in stuff on your openelec box, those would have appeared in your gotham box (ie you library would be populated the same as your openelec one). That would have been the one and only sync though, as from then on, they would use their own databases

 

 

Share this post


Link to post

Thank you for the clarification Kal.

 

Sent from my HTC One dual sim using Tapatalk

 

 

Share this post


Link to post

Is there an updated guide for setting up MySQL for centralized Kodi library?

 

A long time ago I installed MySQL but never got it working for centralized XBMC library.  And I now installed a cache drive and need to re-install MySQL to the cache drive instead, how do I do that?

Share this post


Link to post

This guide doesn't need any updating, outside of maybe linking to an updated SQL pkg (or whatever unRAID uses now).

Share this post


Link to post

I installed SNAP and use an SSD to run all my apps. It's really fast. I do use a cache drive, but that's for downloads, temp files and transfers.

Share this post


Link to post

I have SNAP installed but have never used it, but I understand you can mount drives outside the protected array with it.

 

My cache drive is an SSD, any reason not to dual-purpose it for apps and cache?  vs. keeping cache separate?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.