Bug 137765 - mysql-server: init.d script error with 'stop'
mysql-server: init.d script error with 'stop'
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: mysql (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
Depends On:
  Show dependency treegraph
Reported: 2004-11-01 00:11 EST by Guy Waugh
Modified: 2013-07-02 23:02 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-01 19:11:29 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 Guy Waugh 2004-11-01 00:11:24 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)

Description of problem:
I hope this is relevant here, as I could not find the 'mysql-server'
RPM in the list of packages to choose for this bug (mysql-server being
in the 'Extras' channel)... anyway, here goes.

BTW, this also happened with mysql-server-3.23.58-1.

Using the init.d script (/etc/rc.d/init.d/mysqld) to start mysqld
works fine, but doesn't seem to write the PID file to
/var/run/mysqld/mysqld.pid (there is no file at all in
/var/run/mysqld). When I use the init.d script to stop mysqld, it says
[FAILED], and the daemon is still running. I'm guessing it fails
because it can't find /var/run/mysqld/mysqld.pid.

I had thought that startup scripts like this had to write the PID file
manually themselves, but I can't see where that happens in other
init.d scripts on my box, so I'm at a loss with this...

Thanks in advance.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Start MySQL (/etc/rc.d/init.d/mysqld start);
2. Attempt to stop MySQL (/etc/rc.d/init.d/mysqld stop).

Actual Results:  Observe the [FAILED] message, do 'ps -ef', see mysql
processes still running.

Expected Results:  The MySQL daemon should have terminated.

Additional info:
Comment 1 Tom Lane 2004-11-01 11:19:57 EST
It works fine for me.  Check that /etc/my.cnf has
in the [safe_mysqld] section, and make sure that the
/var/run/mysqld directory is writable by the mysql user.
Comment 2 Guy Waugh 2004-11-01 19:11:29 EST
Yes indeed. /etc/my.cnf did not have any entry for pid-file. I added
it to the [mysqld] section, and it worked fine. There was no
[safe_mysqld] section in the my.cnf file, so I have left it in the
[mysqld] section.

Thanks for your help.

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