PDA

View Full Version : Another Try---Using an Existing Mysql Server



BigBirdy
2006-09-22, 07:56
Ok, my last post didnít generate any replies so maybe a different subject. This cant be a unique situation, but I would like to use my existing mysql server which just happens to run on the same server as slimserver. Are there any howto's on how to move to a single, existing mysql server. This should be simple, export, import and change some db id/password/port/host settings somewhere.

Thanks for anyone that can help

__________________________
Johnny Stork

hickinbottoms
2006-09-22, 08:07
Ok, my last post didnít generate any replies so maybe a different subject. This cant be a unique situation, but I would like to use my existing mysql server which just happens to run on the same server as slimserver. Are there any howto's on how to move to a single, existing mysql server. This should be simple, export, import and change some db id/password/port/host settings somewhere.

Thanks for anyone that can help

__________________________
Johnny Stork

Funny you should say that, but I wrote one last night:

http://wiki.slimdevices.com/index.cgi?ExistingMySQLInstance

Useful thing, that wiki.

Stuart

adhawkins
2006-09-22, 08:10
Hi,

In article <H00000670014e2a7.1158937015.penguin.johnnystork.ca @MHS>,
Johnny Stork<stork (AT) openenterprise (DOT) ca> wrote:
> Ok, my last post didnít generate any replies so maybe a different subject. This cant be a unique situation, but I would like to use my existing mysql server which just happens to run on the same server as slimserver. Are there any howto's on how to move to a single, existing mysql server. This should be simple, export, import and change some db id/password/port/host settings somewhere.

There are already a number of threads actively discussing this. Can I
suggest a search?

Thanks

Andy

jimwillsher
2006-09-22, 08:20
And following that howto, I now have it working. MySql 5.0.2.4 on Ubuntu.


I have my own installation notes for all my Linux software, and here's my steps for 6.5:




apt-get install gcc libexpat1-dev

Get the tarball
(e.g.) wget SlimServer_v6.5.0.tar.gz

Unzip it
tar -xzf SlimServer_v6.5.0.tar.gz

Move it
mv SlimServer_v6.5.0 /usr/local

Symlink
cd /usr/local
rm slimserver
ln -s SlimServer_v6.5.0 slimserver

Build it (ignore signedness messages)
/usr/local/slimserver/Bin/build-perl-modules.pl
/usr/bin/perl
/usr/local/slimserver
/tmp

Create a MySql database
mysql -uroot -pxxxxx
create database slimserver;
grant all on slimserver.* to slimserver identified by 'music';

Edit the preferences file
nano /slim/slimserver.pref

dbsource:dbi:mysql:database=slimserver;mysql_socke t=/var/run/mysqld/mysqld.sock
dbusername: slimserver
dbpassword: yyyyy

(this assumes the socket is correct Ė see mysql_config Ėsocket)

Ensure that permissions are correct
chown ĖR /usr/local/slimserver slimserver
chown /tmp/slimserver.log slimserver

Start it
cd slimserver
./slimserver.pl --daemon

Create a startup file /etc/init.d/slimserver
#!/bin/sh
echo "Starting SlimServer"
cd /usr/local/slimserver;
./slimserver.pl --daemon --d_server --d_info --d_sql --logfile /tmp/slimserver.log

Set the file permissions
chmod 755 /etc/init.d/slimserver

Create the chklevel links
cd /etc/rc2.d
ln -s /etc/init.d/slimserver S99slimserver




Hope this helps.


Jim

Jeff Coffler
2006-09-22, 10:31
hickinbottoms wrote:
> Funny you should say that, but I wrote one last night:
>
> http://wiki.slimdevices.com/index.cgi?ExistingMySQLInstance
>
> Useful thing, that wiki.
>
> Stuart
>

Great page.

I just updated it this morning for Fedora. Ended up just being
clarification, since no changes are needed for Fedora with regards to
slimserver vs. mysql startup ordering.

-- Jeff