Jump to content
RESET Forums (homeservershow.com)

xbmc library sync using mysql


Recommended Posts

I have multiple devices on my LAN using xbmc and I wanted to have one central database to store library information and watched/unwatched status'. I also though it'd be cool if I could pause a movie on one device and pick up where I left off using a different device :D

I found mysql to be the perfect tool for this but it took a while to find out how to integrate it with xbmc, so I thought I'd share how I managed to get it to work so hopefully it'll help you guys out...

My Server OS: Ubuntu Desktop 12.04LTS

1 - On your server install mysql server

sudo apt-get update
sudo apt-get mysql-server

2 - Secure mysql sever installation

sudo mysql_secure_installation
follow the steps on the screen

3 - Configure mysql server

sudo gedit /etc/mysql/my.cnf
Scroll down to 'bind address' & replace IP with IP address of server

4 - Set up xbmc as a mysql user and set privilages

mysql -u root -p
create user 'xbmc' identified by 'password';
(edit password)
grant all on *.* to 'xbmc'
ctrl+d to exit

5 - Open firewall port 3306 on server

6 - On your server create and edit advancedsettings.xml file

Linux:             /home/"user"/.xbmc/userdata/advancedsettings.xml
Mac:               /Users/"user"/Library/Application Support/XBMC/userdata/advancedsettings.xml
XP:                 Documents and Settings\"user"\Application Data\XBMC\userdata\advancedsettings.xml
Vista/Win7:   Users\"user"\AppData\Roaming\XBMC\userdata\advancedsettings.xml
iOS:                /private/var/mobile/Library/Preferences/XBMC/userdata/advancedsettings.xml
Android:        Android/data/org.xbmc.xbmc/files/.xbmc/userdata/advancedsettings.xml
OpenELEC:  /storage/.xbmc/userdata/advancedsettings.xml

Add the following and edit IP address & password


7 - On your server, add all your media sources and fully update your xbmc library

8 - Check mysql database entries to make sure xbmc is infact using mysql

mysql -u root -p
show databases;

You should see MyVideos & MyMusic databases

9 - On the client install a mysql connector

For a Ubuntu client open terminal and use:
sudo apt-get update
sudo apt-get install mysql-client

10 - Open firewall port 3306 on client

11 - Copy the advancedsettings.xml to the client

If your using Linux you can use SSH
scp /home/"user"/.xbmc/userdata/advancedsettings.xml "user"@client.IP:/home/"user"/.xbmc/userdata/advancedsettings.xml

12 - If your sharing Thumbnails as well you need to copy the textures.db to your client too in order for them to automatically sync.

scp /home/"user"/.xbmc/userdata/Database/Textures.db "user"@client.IP:/home/"user"/.xbmc/userdata/Database/Textures.db

13 - Load xbmc on your client and and check your library.

Has it worked? Leave a post below and let us know :D


For more info on synchronising xbmc libraries check out this xbmc wiki page:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...