Bug 54671 - mysql-server fails to shut down
mysql-server fails to shut down
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: mysql (Show other bugs)
7.0
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Patrick Macdonald
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-10-15 20:06 EDT by Need Real Name
Modified: 2007-04-18 12:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-10-17 16:36:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-10-15 20:06:04 EDT
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):


How reproducible:
Always

Steps to Reproduce:
1. shutdown -r now
2.
3.
	

Actual Results:  mysqld fails to shut down

Expected Results:  mysqld should shut down

Additional info:

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.
Comment 1 Trond Eivind Glomsrxd 2001-10-17 12:00:44 EDT
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.
Comment 2 Need Real Name 2001-10-17 16:16:49 EDT
> Bugs are filed against SRPM, not binary rpm, so "mysql-server" isn't missing -
> "mysql" is the correct component. 

ok, thx.

> 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.
Comment 3 Trond Eivind Glomsrxd 2001-10-17 16:23:54 EDT
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.
Comment 4 Need Real Name 2001-10-17 16:36:19 EDT
> 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.
Comment 5 Trond Eivind Glomsrxd 2002-04-08 15:33:27 EDT
Fixed in newer versions (like 3.23.49-2), which uses kill to shut it down.

Note You need to log in before you can comment on or make changes to this bug.