A couple of things about MySQL that everyone should remember, It really is for people with multiple boxes that want to share one DB. I have seen no advantage over SQLite with just one xbmc instance. The second is that all your xbmc installations must have the same source location. In my case I map my raid array to
/home/xbmc/library. Every box is mapped the same. I use NFS since it is usually faster than Samba, I am not sharing anything
from a Windows box, I do share
to a Windows box and NFS works fine for that.
I basically set up MySQL using the guide that lifehacker put out here:
How to Synchronize Your XBMC Media Center Between Every Room in the House
This only solves part of the problem with multiple installations, thumbnails are another issue altogether with it's own solution. Basically I took an existing
Thumbnails directory from
/home/xbmc/.xbmc/userdata/ and copied it to my raid array mounted on
/media/library/ on it's own box. Note that I then mount
server:/media/library/ to
xbmc:/home/xbmc/library/. Inside that folder I have a Movies, Music, Television, Videos, among a few other folders as well as a Thumbnails folder. So every xbmc box ends up with a copy of the exact same Thumbnails folder in exactly the same location. The last step is to create a symbolic link from
/home/xbmc/library/Thumbnails/ to
/home/xbmc/.xbmc/userdata/, easily accomplished with this command:
ln -s /home/xbmc/library/Thumbnails/ /home/xbmc/.xbmc/userdata/
This creates a new Thumbnails which is really a shortcut to the one mounted from the raid array. Note that you can't do this while xbmc is running since the real Thumbnails exists and if you delete it xbmc will just recreate it before you could ever create the link.
From this point you can simply update one instance of xbmc and every one has the same info. The reason you must do this after defining sources is that I have found that if every xbmc does not know what the sources are in advance the "Info" does not work. It will play the movies/music/TV/videos just fine, but it does not actually know what the content is supposed to be.
Depending on the speed of your network as well as your raid setup there may or may not be a slight delay displaying thumbnails or starting up content. In my case, every box is on a 1 Gb network (hardwired), and my array is pretty fast since it is a real hardware raid not fakeraid or software based. Still I put the drives to sleep after an hour of inactivity so the first access can take from 5-10 seconds before any of the thumbnails show up but after that the delay is so slight to be almost unnoticeable. The first bit of content can take up to about 30 second to start but after that it isn't much slower than running from a slow local HDD. This would go away if I ever choose to reconfigure and not spin down the drives.
So step by step it might look like this:
- xbmc installed and configured to use the correct source directories
- stop xbmc
- Edit /home/xbmc/.xbmc/userdata/advancedsettings.xml to include MySQL configuration
- Delete /home/xbmc/.xbmc/userdata/Thumnails
- Symbolic link the network Thumbnails directory
- Restart xbmc
I also use ember and have it set up to only update one of my xbmc boxes, since you and I both have our media on raid arrays all the .nfo, .jpg, .png and .tbn as well as trailer files stay with the movies. I save space by reencoding the movie itself and don't really worry too much about the trailers or the other files since they are so small. My library consists (at the moment) of 600 movies (with about 575 HD movies) and over 10,000 mp3/ape/flac music files and just over 300 TV episodes. I am only using about 55% of my 9TB Raid-5 array. If I ever get hard up for space, I could always dump all the .nfo and .tbn files since they have already been read into the db and thumbnails created, you could always export the db if you wanted them back without rescraping in embermm, I also use an older version of embermm with Rogue's scrapper.
Just as a point of reference, my current setup uses just over 1.7 GB of HDD for Ubuntu 10.10 and XBMC, but I do not have the overhead and storage requirements to compile from source, choosing to use the nightly builds instead. At some point I will likely replace all the drives in the three xbmc boxes with some small SSD's, less power and less heat, quieter too!