multiple mysql server

Sunil Sunder Raj unixtools at hotmail.com
Sat Jul 30 07:29:13 GMT 2005


Hi,
1)  install mysql
2)  copy the mysql data directory to say mysql1
So you have /var/db/mysql and /var/db/mysql1

3) Open the first mysql /var/db/mysql/my.cnf
Change
port            = <The port you want the first mysql to listen to>
bind-address    = <The ip you want the first mysql to bind to>

4) start the first mysql server

5) Open the second mysql /var/db/mysql1/my.cnf
Change
port            = <The port you want the second mysql to listen to>
bind-address    = <The ip you want the second mysql to bind to>

6) Write the startup command for the second mysql server
/usr/local/bin/mysqld_safe --bind-address=<The ip address you want to bind 
the second mysql server to> --user=mysql --socket=/tmp/mysql1.sock 
--datadir=/var/db/mysql1 --pid-file=/var/run/mysql1.pid &

This works great for n number of mysql servers. Tested and working on one of 
my live servers.

-Sunil Sunder Raj

>From: Sean Ellis <sellis at telus.net>
>Reply-To: sellis at telus.net
>To: John Von Essen <john at essenz.com>
>CC: freebsd-isp at freebsd.org
>Subject: Re: multiple mysql server
>Date: Fri, 29 Jul 2005 15:25:40 -0700
>
>On Fri, Jul 29, 2005 at 01:08:07PM -0400, John Von Essen wrote:
>
>John,
>
> > >
> > > can anyone recommend  a good online resource for implementing a second
> >
> > http://dev.mysql.com/doc/mysql/en/multiple-servers.html
> >
>
>Thanks for the response. Quite a lot of detail there.
>
>To refresh my memory; I know how to supply make with options such as
>'WITH_CHARSET=utf8' when building the port, but how do I give a configure
>option like '--prefix=/usr/local/mysql-4.0.17'?
>
>--
>
>Sean
>_______________________________________________
>freebsd-isp at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-isp
>To unsubscribe, send any mail to "freebsd-isp-unsubscribe at freebsd.org"




More information about the freebsd-isp mailing list