Mysql two inastance on same server
Hello,
I am trying to create two instances of mysql on the same server. I am running fedora core 6 mysql 5.0.22. I have amended the my.cnf, but both instances are not running. It creates the mysql tables in the default /var/lib/mysql ignoring the my.cnf file. Can anyone tell what I should add to my.cnf to get 2 instances of mysql on the same server in /var/lib/mysql1 and /var/lib/mysql2
my.cnf :-
[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
user = mysql
[mysqld1]
socket = /var/lib/mysql1/mysql.sock1
port = 3307
pid-file = /var/lib/mysql1/mysql.pid1
datadir = /var/lib/mysql1/data
basedir = /var/lib/mysql1
user = mysql
[mysqld2]
socket = /var/lib/mysql2/mysql.sock2
port = 3308
pid-file = /var/lib/mysql2/mysql.pid2
datadir = /var/lib/mysql2/data
basedir = /var/lib/mysql2
user = mysql
ps info :-
root 7458 1 0 11:59 pts/3 00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/lib/mysql2/mysql.pid2 --log-error=/var/log/mysqld.log
mysql 7482 7458 1 11:59 pts/3 00:00:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql2/mysql.pid2 --skip-locking
thanks
Barry
|