====== Two Mysql Instances ======
- install mysql
- copy the mysql data directory to say mysql1
So you have /var/db/mysql and /var/db/mysql1
- Open the first mysql /var/db/mysql/my.cnf
Change
port =
bind-address =
- start the first mysql server
- Open the second mysql /var/db/mysql1/my.cnf
Change
port =
bind-address =
- Write the startup command for the second mysql server
/usr/local/bin/mysqld_safe --bind-address= --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.
[[http://dev.mysql.com/doc/refman/5.1/en/multiple-servers.html | further reference]]