Although I only have a single device running XBMC, I've set up a shared library mainly so that I can reinstall RaspBMC (or switch to OpenElec, etc) whenever I want without having to worry about the library. Another benefit is that I can run the shared library using MySQL (stored on a USB Hard Drive) on a BeagleBone Black - with a more powerful CPU, and directly connected to my media!
This is on a BeagleBone Black running Debian...
apt-get install mysql-server
And set a secure root password when requested!
Edit /etc/mysql/my.cnf to allow connections from the local network, rather than just from localhost (change the "bind-address" to the server's IP address, 192.168.1.123 in the example):
sed -i '/bind-address/c\bind-address = 192.168.1.123' /etc/mysql/my.cnf
service mysql restart
Connect to MySQL (type in your root MySQL password when requested):
mysql -u root -p
Create a MySQL user for XBMC (obviously you can select your own password if you want), and give the user full access to any databases (this can be restricted later if you want):
CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';
GRANT ALL ON *.* TO 'xbmc';
This is on a Raspberry Pi running RaspBMC...
Create or edit the advancedsettings.xml file in XBMC's userdata folder - ~/.xbmc/userdata/advancedsettings.xml
Insert the following (using the correct IP address for the server, and password for the xbmc MySQL account):
If you want, you can also move a number of XBMC's settings files to be stored (and shared) remotely by adding extra settings to this file (before the </advancedsettings> tag), e.g.: