Bug 137765 - mysql-server: init.d script error with 'stop'
Summary: mysql-server: init.d script error with 'stop'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: mysql
Version: 3.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom Lane
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-01 05:11 UTC by Guy Waugh
Modified: 2013-07-03 03:02 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-11-02 00:11:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Guy Waugh 2004-11-01 05:11:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)
Gecko/20040924

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):
mysql-server-3.23.58-2.3

How reproducible:
Always

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 16:19:57 UTC
It works fine for me.  Check that /etc/my.cnf has
pid-file=/var/run/mysqld/mysqld.pid
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-02 00:11:29 UTC
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.