View Full Version : Using MySQL on a different computer

2007-03-05, 14:55
I am setting up an instance of SlimServer in a zone in Solaris 10 for my wife's iTunes collection. We have music that overlaps and I really want to keep her stuff seperate from mine. Since the second SlimServer will run in a virtual Solaris (zone) to try to cut down on system overhead, I'd like to point the SlimServer hosting my wife's music to use the MySQL already running in the global zone but haven't seen quite how to do this. What I will end up with is two instances of SlimServer running in their own spaces but sharing a common MySQL.

I think I have a handle on all of the steps I need to take with MySQL itself, it's pointing SlimServer to a remote MySQL?

Any references I've overlooked?

2007-03-05, 15:04
Look in the slimserver.pref file:

dbsource: dbi:mysql:hostname=;database=%s

Change hostname appropriately.

2007-03-05, 16:25
Look in the slimserver.pref file:

dbsource: dbi:mysql:hostname=;database=%s

Change hostname appropriately.

May need a bit more than that.

You'll need to create the database(s) and a database user yourself, then give the user all necessary permissions on the database.

In the dbsource line, the %s expands to 'slimserver', so if you have two SlimServer databases on the server, at least one of them will have to be named something else.

Also, you might need to change the database username to whatever name you use in MySQL, and enter a password if the user needs a password for access. The default SlimServer instance of MySQL just uses a username of 'slimsever', with no password.

Make sure you stop SlimServer while editing the prefs file.

dbpassword: whatever
dbsource: dbi:mysql:hostname=;port=3306;database=sl imserver6
dbusername: slim

2007-03-06, 05:08
Thanks, both of you. I've been running MySQL that I compiled and following the wiki for using an existing MySQL instance rather than the included MySQL. I had always changed the dbsource line to

dbsource: dbi:mysql:database=slimserver

But now that I think about it it might be unnecessary to change it like I do since the only MySQL on my system is the one I compiled. Since I change the dbsource line like I do I had forgotten that it came configured with the address. Doh! Had I been doing a fresh install I probably would've had it figured out on my own...

As far as MySQL went, I already had the new database waiting and outside of the fact that I forgot about changing the authentication to use the old_password it was no problem.

My wife will be pleased that she can play her tunes on the Squeezebox with only the hassle of telling the Squeezebox to use the other server. Now I can finally uninstall SlimServer from my XP box...