Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171753 - dev-db/mysql-init-scripts - better support for multiple servers
Summary: dev-db/mysql-init-scripts - better support for multiple servers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-22 07:44 UTC by Bernd Wurst
Modified: 2011-01-13 20:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Wurst 2007-03-22 07:44:06 UTC
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!
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-05-11 08:32:51 UTC
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.
Comment 2 Walter 2009-08-10 14:33:09 UTC
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.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-13 20:07:37 UTC
Implemented in new mysql-init-scripts-2.0_pre1