Bug #9877 Cannot stop Mysql service
Submitted: 13 Apr 2005 17:14 Modified: 22 Nov 2006 17:51
Reporter: Kirk Bowman Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:4.1 (?) OS:MacOS (Mac OS 10.3.8)
Assigned to: Chad MILLER CPU Architecture:Any

[13 Apr 2005 17:14] Kirk Bowman
Mysql 4.0.23

Cannot stop the Mysql service by clicking the Stop Server button on the Service panel.

Clicking the button returns this error in the console:

"Stopping server...
No mysqld pid file found. Looked for /mysql_data//PowerBook-G4.local.pid.
Failed to stop server."

The name of the pid file in the data folder on the computer is "PowerBook-G4.pid".

How to repeat:
1. Launch Mysql Administrator
2. Login to mysql
3. Click on the Service panel button
4. Click on the Stop Service button

Suggested fix:
Determine correct name of pid file
[13 Apr 2005 21:38] Jorge del Conde
Thanks for your bug report
[20 Apr 2005 18:21] Alfredo Kojima

Administrator tries to stop the server by executing:
/usr/local/mysql/support-files/mysql.server stop

Can you try to call that by hand and confirm whether the error persists? 
If it does, that is a bug in the mysql.server script (or in whatever creates the pid file).
Please reassign the bug to the MySQL Server cateogory (or I can do it myself after your confirmation).

Also, I am now trying "mysqladmin shutdown" whenever the above command fails, as a fallback,
so hopefully version 1.0.8 will properly shutdown mysql even with the start/stop script broken.
[28 Apr 2005 3:53] Kirk Bowman
I tested the command as requested and received the error below.

/usr/local/mysql/support-files/mysql.server stop

No mysqld pid file found. Looked for /mysql_data//PowerBook-G4.local.pid.
[22 Nov 2006 17:51] Chad MILLER
Thank you Alfredo.  The mysql.server script stops and starts the server the same way.  It uses the system "hostname" program to construct the PID-file name.  If the server were started using some other method, then the PID-file could be named something else altogether.

My determination is that "mysql.server" will work and does stop the server but only necessarily for cases where the server was started with that same script.  So if the GUI was used to start the server, and the GUI uses that script to start the server, then the GUI will be able to stop the server using that script.

I suspect the best classification for this report is "Not a Bug", but since I don't have information about how it was used, I'll fall back to "Can't Repeat."

Please reopen if there's some problem in my reasoning.
[18 Sep 2007 17:12] Christian Nadolle
Had the same problem with recent mysql (5.0.45) on osx 10.4.10

I found out that (on my notebook) the Startupscript generates a pidfile with <zeroconf-name>.local.pid, before the computer sets a better hostname (via dhcp and bind).
So later, it could not find the <fqdn>.pid file. 
Neither the PreferencePane could stop nor whatever runs on shutdown
The computer would even hang forever on shutdown.

setting a hard-coded   $pid-file in /etc/my.cnf
solved the problem for me