Setup second MySQL server
I'm trying to setup a second MySQL server on my CentOS 5.7 box. I've followed several Google results which all have you make a data directory and populate it from the command line. I've also made a my2.cnf file with the startup variables in.
The problem comes when I try and start the service. I copied the /etc/rc.d/init.d/mysqld file to mysqld2 and edited the values to point to the new data directory, pid file etc but if I run service mysqld2 start it starts the original server and not the new one.
I can start the second server from the command line but I would like to be able to start it as a service and have it automatically start on boot up.
Is there anything obvious I may have missed or any hints why the second init file doesn't pass the second cnf file when run ?