From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
Description of problem:
NOTE: this bug refers to "mysql-server" NOT to "mysql" but BUGZILLA DOES
NOT OFFER THAT AS AN OPTION.
The bug: after changing the root password, the mysql-server fails to
shutdown upon a system reboot.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. shutdown -r now
Actual Results: mysqld fails to shut down
Expected Results: mysqld should shut down
after installing the mysql-server RPM it is advisable to change the mysql-
root password. this is standard procedure. the problem is that having
done so, /etc/init.d/mysqld now fails to shut the server down. This is
because the command: "/usr/bin/mysqladmin shutdown > /dev/null 2>&1" in
the script needs to be modified to add the new root password. Since IT IS
HIGHLY UN-ADVISABLE to write the plaintext password for root here, it has
been suggested in the mysql mailing list that a "shutdown" account be
created with only shutdown permission and no password. this account
should then be used by the script to shut down the server.
a second possibility which I favour is to set the $HOME variable to /root
in the script (right before the call to mysqladmin) such that the system
admin can place a .my.cnf file there with his password since mysqladmin
will use that.
Bugs are filed against SRPM, not binary rpm, so "mysql-server" isn't missing -
"mysql" is the correct component. As for how to fix the mysql brokenness
(process control should not be restricted by password, root can kill it anyway
and should thus be able to shut it down cleanly as well) I haven't decided yet.
> Bugs are filed against SRPM, not binary rpm, so "mysql-server" isn't missing -
> "mysql" is the correct component.
> As for how to fix the mysql brokenness (process control should not be
> restricted by password, root can kill it anyway and should thus be able
> to shut it down cleanly as well) I haven't decided yet.
I'm not sure I understand what you mean by "process control should not be
restricted by password"... if this means that the account used to shut the
server down should not have a password, then I guess the first alternative is
better... in fact, it really is a better alternative than the $HOME/.my.cnf
solution I outlined since that still requires the user to do something for the
server to shut down properly.
What I meant is that root should be able to do anything to a process without a
password. One likely solution is to just kill it instead of using mysqladmin -
not good, but mysql doesn't have something equivalent to pg_ctl. Root should be
able to use mysqladmin locally without password.
> One likely solution
yes, you could just replace the code in stop(), and announce the server's been
shut down, letting the killall do it. but I agree, no good. if it were Sybase
running it'd definitely be no good.
so the way to deal with it is with its own tools. mysqldmin doesn't need a
password if called with -u shutdown and that account has no password. the good
thing about this approach is it's easy for you to script in a way that doesn't
need to be touched by the user later.
Fixed in newer versions (like 3.23.49-2), which uses kill to shut it down.