Red Hat Bugzilla – Bug 175902
Timeout error occurred trying to start MySQL daemon
Last modified: 2013-07-02 23:07:34 EDT
I am creating this bug as a clone of #172426, because the problem that
the Fedora Core 4 version fixes ('/etc/init.d/mysqld' not waiting for MySQL
daemon to stop) exists in previous versions of that script.
This needs to be fixed, then, in FC3's mysql. Thanks. -David
+++ This bug was initially created as a clone of Bug #172426 +++
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922
Description of problem:
When restarting MySQL daemon using '/etc/init.d/mysqld' or 'service mysqld
restart', the message "Timeout error occurred trying to start MySQL daemon" is
displayed and restart fails.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. service mysqld restart
Actual Results: root@localhost ~# service mysqld restart
Stopping MySQL: [ OK ]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
Expected Results: root@localhost ~# service mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
It appears the 'stop()' function in '/etc/init.d/mysqld' does not wait for MySQL
daemon to stop. It sends a SIGTERM to the process and removes the lock file and
the socket file immediately, even if the process is still shutting down.
Changing the 'stop()' function to:
MPID=`cat "$mypidfile" 2>/dev/null`
/bin/kill `cat "$mypidfile" 2>/dev/null ` >/dev/null 2>&1
if [ -n "$MPID" ]; then
while kill -0 $MPID 2>/dev/null; do
if [ $ret -eq 0 ]; then
-- Additional comment from firstname.lastname@example.org on 2005-11-14 23:06 EST --
I've put a loop similar to this into the latest updates (4.1.15 and 5.0.15).
Not sure why the issue hasn't
come up before; perhaps recent versions of MySQL take longer to shut down than
they used to?
-- Additional comment from email@example.com on 2005-11-29 05:01 EST --
Thanks for this fix.
Concerning shutdown/restart speed, the machine was not that powerfull (an old
PIII) and somewhat loaded. This might explain this "special" case.
-- Additional comment from firstname.lastname@example.org on 2005-12-15 02:41 EST --
Does this affect FC3 as well?
-- Additional comment from email@example.com on 2005-12-15 08:53 EST --
I think the Fedora Legacy guys already took care of it --- see bug #152531
-- Additional comment from firstname.lastname@example.org on 2005-12-15 21:00 EST --
Fedora Legacy guys have not taken care of this bug. At this moment, Legacy
maintains RHL7.3, RHL9, FC1 and FC2. FC3 is not on the Fedora Legacy project's
maintanence list yet.
I'll open a new bug for this. Thanks, Tom.
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.
Fedora Legacy is closed. This bug will not be fixed by Fedora Legacy.