I set up a system where I have two mysql servers running on the same machine. The current mysql-5 init-script claims to do this job, AFAICS. But lately, I recognized that the way it does it's job is really crappy. E.g., the comments I do not want to read in the init-script: # only the first run is done by start-stop-daemon # successfull if at least one mysqld started And in practical use, it's annoying that mysql-init-script has no control about which server was started. I have no control about which server to restart in case of config changes. Please have a look at e.g. the net- or openvpn-init-scripts. They point out how to handle several similar services the usable way: * To create more VPNs, simply create a new .conf file for it and * then create a symlink to the openvpn init script from a link called * openvpn.newconfname - like so * cd /etc/openvpn * nano foo.conf * cd /etc/init.d * ln -s openvpn openvpn.foo * * You can then treat openvpn.foo as any other service, so you can * stop one vpn and start another if you need to. That's fancy!
my own existing setups are: ln -s /etc/init.d/{mysql,mysql.slave} cp /etc/conf.d/{mysql,mysql.slave} and then I edit conf.d/mysql.slave. But I'll look at supporting some this for you.
Yes, because MySQL is a basic service used as a component by many (web based and other) systems it would be very helpful to have multiple instances for testing, debugging, etc. An initial implementation requiring a single version for all instances would be fine, a better implementation would allow arbitrary use of any installed version for any desired instance. (This would be a great help for Gentoo-based developers, who could elegantly test code against different MySQL versions. Because historically major functionality in MySQL has been broken (eg: relatively long-leved table-specific GRANT bug!), it is not hard to see how useful this could be!) Just FYI the OpenVPN multiple init.d script was also my introduction to multiple instances of a given service, I found it extremely straightforward and currently use it on many machines, and have come to expect this from Gentoo init scripts. (I just voted on another bug to bring this to memcached.) It would be excellent to see this functionality brought to gentoo's MySQL init script.
Implemented in new mysql-init-scripts-2.0_pre1