Shared Library with XBMC

After completing the setup of my new storage server and basic reconstruction of my network, I decided to take it upon myself to use these new technologies and create a media network for my home. I wanted this to consist of 2 XBMC boxes running with a shared library so that I could pause movies and shows on my basement system and resume upstairs – as well as keep my library consistent and organized. To do this, it’s a fairly easy process and I only had one real issue with the configuration.

Step 1: Install MySQL

Making the assumption that you have determined your server and clients, the first step is to create a MySQL instance and database. I already had MySQL running from some other projects on my server, so if you don’t already have this complete, go ahead and get MySQL installed with the default settings.

Step 2: Prep the Database

From the MySQL console, you’ll want to start by creating a new user that will be able to write to the databases. To do so, run the following command:

CREATE USER ‘xbmc’ IDENTIFIED BY ‘xbmc’;

Obvviously you can change the name if you’d prefer, but for the sake of this article I’m going to keep it at that.

While your in the MySQL let’s go ahead and create the new databases you will be using. I’ve created two – one for music and one for video. This is accomplished by the following:

CREATE database xbmc_video;
CREATE database xbmc_music;

Once the databases are created you can go ahead and grant all permissions to the xbmc user you previously created:

GRANT ALL ON *.* TO ‘xbmc’;