If you are using multiple instances of XBMC throughout your house one thing you’ll definitely want to consider is setting up a shared MySQL database that can be used to retain data about the media you have. A good example of this is saving the status of where you left off in a video. If all of your XBMC instances don’t share a centralized data system you won’t be able to stop a video in one room and pick up where you left off in another. A MySQL database gives each XBMC a way to share that data.
You can even step beyond just sharing a database and share other files as well. This can include thumbnails of the media you have in your library, add-on configurations, media sources, and more. When all of this is set up it will almost be like having a centralized XBMC server.
Setup a Shared MySQL Database:

On your centralized server you’ll want to install and configure MySQL which will vary based on OS. Here is a general overview of what you need to do:
- Install and start MySQL (note that there is a link to skip registering for an account on the download page)
- Open the Terminal (on a Mac) or the MySQL Command Line Client (on Windows) and run the following commands:
- CREATE USER ‘xbmc’ IDENTIFIED BY ‘xbmc’;
CREATE database xbmc_video;(This is no longer needed)CREATE database xbmc_music;(This is no longer needed)- GRANT ALL ON *.* TO ‘xbmc’;
Now we need to configure the XBMC clients to connect to the new MySQL database. On each of the clients navigate to the following directory:
- Mac: ~/Library/Application Support/XBMC/userdata/
- Windows: %appdata%\XBMC\userdata\
If you don’t see a file named advancedsettings.xml go ahead and create it, but if it does exist just open it up. You’ll need to add the following lines to it:
<videodatabase>
<host>192.168.1.10</host>
<name>xbmc_video</name>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.1.10</host>
<name>xbmc_music</name>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>
All you have to do is update the <host> IP address to point to the computer running your MySQL instance, restart XBMC, and it should start using the databases you created. If you’re still having troubles you can head on over to the XBMC Wiki to take a look at some of their OS-specific tips.
Share Settings and Add-on Configuration Files:
XBMC also has what they refer to as a special protocol that will let you configure local files to be shared among multiple instances thanks to path substitution. What that means is that you can tell XBMC to redirect any requests to specific files/folders to a remote location on another computer.
Below you can see I’m redirecting all kinds of locations including thumbnails used for movies/TV shows, playlists, addon configuration data, all of my media sources, and more.
To get started on each of the clients navigate to the following directory:
- Mac: ~/Library/Application Support/XBMC/userdata/
- Windows: %appdata%\XBMC\userdata\
If you don’t see a file named advancedsettings.xml go ahead and create it, but if it does exist just open it up. You’ll then want to add the lines below and update the “to” node of each substitution to match how your system is set up. The “smb” refers to the Samba protocol I’m using to connect to the share, the “192.168.1.10″ is the IP address of the computer hosting the files, and the “XBMC” is the share name on that server.
<pathsubstitution>
<substitute>
<from>special://masterprofile/Thumbnails/</from>
<to>smb://192.168.1.10/XBMC/Thumbnails/</to>
</substitute>
<substitute>
<from>special://masterprofile/playlists/</from>
<to>smb://192.168.1.10/XBMC/Settings/playlists/</to>
</substitute>
<substitute>
<from>special://masterprofile/addon_data/</from>
<to>smb://192.168.1.10/XBMC/Settings/addon_data/</to>
</substitute>
<substitute>
<from>special://masterprofile/sources.xml</from>
<to>smb://192.168.1.10/XBMC/Settings/sources.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/mediasources.xml</from>
<to>smb://192.168.1.10/XBMC/Settings/mediasources.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/RssFeeds.xml</from>
<to>smb://192.168.1.10/XBMC/Settings/RssFeeds.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/favourites.xml</from>
<to>smb://192.168.1.10/XBMC/Settings/favourites.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/profiles.xml</from>
<to>smb://192.168.1.10/XBMC/Settings/profiles.xml</to>
</substitute>
</pathsubstitution>
Once you have this all in place just restart XBMC for the changes to take effect, and you should see it start using those locations for storing the files.
CyberNet’s XBMC Guides:
- XBMC: Introduction to Our Upcoming Guides
Our introduction provides some of the deciding factors for switching from Windows Media Center to XBMC. - XBMC: Build Your Own HTPC
Our extensive guide on the hardware we chose for our home theater PCs (HTPCs), the cost, and some tips on choosing the hardware for your own HTPC. - XBMC: Prepare and Optimize Windows 7
A helpful list of tips to optimize the performance of Windows 7 so that the system is able to offer as many resources to XBMC as it can. - XBMC: IR Receiver and Remote (Harmony, Xbox 360, and More)
If you want your HTPC to operate like a set-top box you’ll definitely want to get a remote control configured, and for me this was a critical step so that I wouldn’t have to be concerned about less tech-savvy users trying to use my TV. - XBMC: Share and Sync Media/Settings Between Multiple XBMC Installs
Configuring XBMC to share settings between multiple instances means you’ll be able to stop a show in one room, and seamlessly pick up where you left off in another room. - XBMC: Fit the Picture to Your TV with Overscan
If XBMC doesn’t fit your TV screen perfectly there are a couple of steps you can take to get it just right. - XBMC: Installing Skins
How to tweak the appearance of XBMC so that it looks the way you want it to. - XBMC: Custom Home Screen Menu Backgrounds
Make the backgrounds of your chosen skin/theme a little more interesting by having it flip through artwork from your favorite TV shows and movies. - XBMC: Dynamic Weather Backgrounds
If you’re using the Aeon MQ 3 theme you can have it use dynamic wallpapers that change based on the time of day and current weather conditions. - XBMC: SMB on Mac OS X 10.7 (Lion)
I use a Mac to serve up files to my XBMC instances running on Windows, and so my preferred protocol for sharing files is SMB. This guide explains how you can get a XBMC-compatible version of SMB running on Mac OS X 10.7 Lion. - XBMC: Adding Media Sources
Learn how to add your media to XBMC and turn on the appropriate content scrapers. - XBMC: Troubleshoot Buffering Issues
Trying to troubleshoot buffer issues in XBMC can be quite a pain, and so I lay out some of the most common culprits. - XBMC: Test Your HTPC with High Bitrate Sample Videos
Want to see how well your HTPC performs? Throw some of these high bitrate 1080p sample videos at it. - XBMC: More Advanced Settings
Configure some of the settings that you won’t find anywhere in the GUI. - XBMC: Stream Hulu, Food Network, and More
Thanks to add-ons you can stream videos from some of your favorite sources including Hulu, Food Network, HGTV, TWiT, and more. - XBMC: AirPlay on Windows
Send videos from your iOS device to any XBMC instance with very little configuration. - XBMC: Web Interface and Chrome Extension
As long as you are on the same network as your XBMC box you can control it from any browser using the built-in web interface, or you can install a Chrome extension to make it even easier. - XBMC: iPhone and iPad Remote
If you own an iPhone or iPad you can enjoy one of the best XBMC remote control experiences I’ve seen, and it will only cost you a few bucks. - XBMC: A List of Our Guides, Plus Helpful Wiki and Forum Posts
A recap of all the guides we’ve written as well as useful wiki and forum post from the official XBMC.org site. - XBMC: Free and Official iOS Remote for XBMC Released
This is the free and official XBMC remote control iOS app (optimized for both the iPhone and iPad). It will let you easily control all of the XBMC instances in your house as long as they are all on the same network. - XBMC: Running XBMC on Startup in Windows 8
Learn how you can make XBMC start automatically when Windows 8 boots. - XBMC: Send YouTube Videos From Chrome to XBMC
Send YouTube videos from your PC to any XBMC instance in a single click. - XBMC: Aeon MQ 4 Skin
If you’re looking for one of the best and most popular XBMC skins the Aeon MQ 4 is a great choice. - XBMC: Android Widget Remote Control
Control multiple instances of XBMC without ever having to open an app on your Android device!

My SQLFu is not too strong, but I think you need to make a small correction to the section on adding the MYSQL database information to the XML file.
192.168.1.10
xbmc_music
3306
xbmc
xbmc
The DB entry that looks like this: xbmc_music should be look like this: xbmc_video
Oops, thanks for pointing that out. Bad copy and paste error on my part. I updated the database name for the video node.
I have just started looking into using MySQL as the DB backend, I was reading that doing a symlink seems to be preferred (faster) than using the advancedsettings.xml file. Have you found any latency using the advancedsettings.xml? I think my use case is a little different than most, I am looking at using MySQL to allow my HTPC whether in Windows, XBMCbuntu or OpenELEC to have the same up to date DB. Some of the other HTPC’s are used by other people so I don’t want their watched status/settings and so on. One last point, did you look into these changes, you’re already doing the first tip.
In advancedsettings.xml:
Use the IP address and NOT the hostname of your MySQL server
In my.ini:
(add to mysqld section)
skip-name-resolve
Thanks for another great article!
I have seen no noticeable performance issues using the advancedsettings.xml method rather than symlinks. I wanted to go the route of using the advancedsettings.xml method because it was easy for me to set up on all my systems. I could just copy the same file across and they would all instantly start using the same paths. Otherwise I would need to go through and set up the symbolic links on each system, which is even more of a pain if you have multiple systems running different OS’s. Just something to think about, but I have no complaints. Of course my whole network is wired with Cat6, so maybe it would be more noticeable if I was doing this over wireless.
In terms of using the IP address I did read that tip, and that’s why I mentioned using the IP address of the MySQL server in the article. I haven’t done the skip-name-resolve step though, but might since it it’s a quick thing to do. I don’t think it will have much impact though.
Ryan,
Thank you for the response, I will let you know how my testing goes. I am also using Cat 6 and Gig in my house. I hope I won’t see some of the performance issues others have seen, I would (like you) prefer to have a file I drop into any system and be ready to rock.
With MQ3 are you able to use banners, extra fanart, logos, cdart, ect? I wonder if that has any baring on load speeds.
I don’t have the plugin installed that downloads all of the extra artwork (like logos and stuff) so I tend to not use those views. I generally stick with banners and the typical fanart that comes from theTVDB. It does have a bunch of extra views in the theme that take advantage of the different kinds of imagery that some of the other plugins will download for you.
Nice guide. You can remove the database creation step. XBMC Eden takes care of all of that for you.
as far as the “XBMC share”. are you just sharing “%appdata%\Roaming\XBMC\userdata”
?