now that I have the necessary environment available, I have been working
on a fix for bug#27072.
The original bug report complains that
> All our rpm packages for Linux autostart the mysqld upon installation.
> Do not start the mysql server as part of the installation.
Removing that "start" step from the RPM spec file would have been easy,
but it would have affected not just the installation of MySQL but also
any upgrade (using the RPM format) - and not starting a server after
upgrade that had been running before seemed unacceptable to me.
I have now finished and checked a fix that will make the installation
and upgrade of the MySQL server (via RPM packages) behave as follows:
- On first installation, the start/stop scripts will be installed in
"/etc/init.d" and symlinked to the run level directories,
which will cause the MySQL server to be started whenever the machine
However, to do as demanded in the bug report, the MySQL server will
not be started directly during installation, but at the next reboot
(unless the sysadmin changed the symlink entries to the run level
- On an upgrade, the "pre" section of the RPM spec file will check
whether the MySQL server is running or not.
It will, using an entry in a file, transfer this knowledge to the
"post" section of the spec file, and then stop the server.
Then, the old binaries will be replaced by the new ones, as usual.
The "post" section will check that file entry:
If the server process was running before the upgrade, the new binaries
will be autostarted during the upgrade step.
If the server process had been stopped before the upgrade, no
autostart will be done, but the start/stop script will be entered into
the system - so as with installation, the server will be started on
the next reboot.
In short words: After an upgrade (via RPM), the MySQL server will be
running if and only if it was running before the upgrade.
My questions to all interested observers, both inside and outside the
- Do you agree to this behaviour, or do you see any problems with it?
- I would like to introduce the changed upgrade policy with the next
release builds in 5.1 and 5.5 after this change got approved,
but introduce the changed installation policy in 5.5 only.
My reasoning is that not autostarting on installation is a functional
change (however desirable), but not autostarting a stopped server (on
upgrade) is a bug fix.
If there are any objections to this, I would like to hear of them,
rather than disappoint you later.
and thanks for your feedback!
Joerg Bruehe, MySQL Build Team, Joerg.Bruehe@stripped
Sun Microsystems GmbH, Komturstrasse 18a, D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz
Amtsgericht Muenchen: HRB161028