PDA

View Full Version : Using a Different MySql Instance with SC?



BigBirdy
2008-09-22, 08:40
With so many applications running their own instances of MySql, I am trying to standardize these since only my one MySql server/instance has regular database backups. I run a MySql instance on the same machine running SC so are there any guides/instructions to point SC to a different instance of MySql.

BTW: It would be VERY beneficial to have this choice as part of the installation process as many people already run MySql and would reduce the overhead of running multiple MySql instances.

I am running SC 7.2 on a RHEL 4 system and would like to point SC to my own MySql 5.0.51a-community instance.

Thanks

JJZolx
2008-09-22, 09:00
With so many applications running their own instances of MySql, I am trying to standardize these since only my one MySql server/instance has regular database backups. I run a MySql instance on the same machine running SC so are there any guides/instructions to point SC to a different instance of MySql.

Create a database in MySQL with whatever name you like. Create a MySQL user and give the user permissions on the database (there's probably a minimum set of needed permissions - I just grant all to this user). Then shut down SqueezeCenter and modify the following three lines. It should be fairly self explanatory - you designate the MySQL user, the user's password, the IP address of the MySQL server, the port number and the database name.



dbpassword: abcdetuvxyz
dbsource: dbi:mysql:hostname=127.0.0.1;port=3306;database=sl imserver11
dbusername: slimserver

BigBirdy
2008-09-22, 10:56
Excellent, and thanks. Now how do I prevent the embedded/default mysql server from starting and are these changes/settings retained on a SC upgrade?

Thanks again :)

JJZolx
2008-09-22, 11:05
Excellent, and thanks. Now how do I prevent the embedded/default mysql server from starting and are these changes/settings retained on a SC upgrade?

I'm not too familiar with running on Linux, but I think that if you stop the bundled MySQL then SqueezeCenter won't start it up again if it can connect to a server with the new settings.

Yes, the settings are kept if you upgrade.

Mark Miksis
2008-09-22, 11:06
Now how do I prevent the embedded/default mysql server from starting

I think SC looks at the MySQL port setting and won't start mysqld if it's been changed. Try it to be sure.


and are these changes/settings retained on a SC upgrade?

Yes.

BTW, please don't cross-post :-)

BigBirdy
2008-09-22, 11:13
GREAT AGAIN! That was it and a smart way for SC to be run! All is well, rebuilding library now and only one instance of MySql running!

And yes I know me bad, cross post, was just not sure which was the more appropriate forum.

Thanks again!!

Now lets hope for some sort of massive overhaul of the SC interface....its about time. Cross-Fading of songs when ffwd or rwd is clicked would also be GREAT feature.....like with Winamp!

Cheers

JJZolx
2008-09-22, 11:15
I am running SC 7.2 on a RHEL 4 system and would like to point SC to my own MySql 5.0.51a-community instance.

BTW, I just noticed the MySQL version that you're running. You'll probably run into some nasty sorting issues with that version due to a MySQL bug. You'll need 5.0.52 or later to resolve them.

See: http://bugs.slimdevices.com/show_bug.cgi?id=7035

BigBirdy
2008-09-22, 11:17
Hmm, my re-scan also seemed to stop 1/3 of the way through. Said it was done but clearly not. Maybe this is related to the MySql bug so will update and try again.