Bug 172426 - Timeout error occurred trying to start MySQL daemon
Timeout error occurred trying to start MySQL daemon
Product: Fedora
Classification: Fedora
Component: mysql (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2005-11-04 05:14 EST by Remy Chibois
Modified: 2013-07-02 23:07 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-11-14 23:06:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Remy Chibois 2005-11-04 05:14:35 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

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):

How reproducible:

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  ]

Additional info:

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
            sleep 1

    if [ $ret -eq 0 ]; then
Comment 1 Tom Lane 2005-11-14 23:06:08 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?
Comment 2 Remy Chibois 2005-11-29 05:01:38 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.
Comment 3 David Eisenstein 2005-12-15 02:41:57 EST
Does this affect FC3 as well?
Comment 4 Tom Lane 2005-12-15 08:53:07 EST
I think the Fedora Legacy guys already took care of it --- see bug #152531
Comment 5 David Eisenstein 2005-12-15 21:00:51 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.

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