Bug #31889 Cannot start MySQL from System Preferences
Submitted: 26 Oct 2007 18:57 Modified: 14 Mar 2008 18:31
Reporter: Matthew Brady Email Updates:
Status: Duplicate Impact on me:
Category:MySQL GUI Common Severity:S2 (Serious)
Version:5.0.41 OS:MacOS (10.5)
Assigned to: CPU Architecture:Any
Tags: 10.5, leopard, system preferences

[26 Oct 2007 18:57] Matthew Brady
I recently installed leopard and have had a problem starting and stopping mysql via the system preferences pane. I will click "Start MySQL Server" and OS X will prompt me for my administrator password, yet it will not start/stop the actual server. I have yet to try this on the most recent mysql release.

How to repeat:
Try to start and stop mysql via System Preferences on Mac OS X Leopard
[27 Oct 2007 7:22] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.0.45, and inform about the results.
[27 Oct 2007 19:28] James White
I have the exact same issue on OSX Leopard (10.5) using MySQL 5.0.45.
[27 Oct 2007 20:12] James White
I can confirm that MySQL will start from the command line using:

sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &

But the service will not start from the applet in System Preferences.
[28 Oct 2007 14:18] wild palms
Its far worse on PPC running Leopard.  I've tried 5.0.41 and 5.1.x - whether .tar or package, each is failing.  Permissions are not being set correctly and getting mysqld running is a real joyride of pain. After 2 reinstalls of Leopard and around 11 installs of mysql i am forced to roll back to another machine as running mysql on Leopard on PPC can NOT be considered ready at this point in time.
[28 Oct 2007 14:23] wild palms
Seems like there is more fun.... MySQL tools are flakey on Leopard, particularly with InnoDB editing and table manipulation.  This caused the MySQL admin tools to crash.
[28 Oct 2007 16:14] Nick Trew
Is this perhaps because Leopard uses "_mysql" as the user, and the Preference Pane is using "mysql"?
[29 Oct 2007 20:16] Andrew Hanna
For the sake of convenience, one can add these two lines to ~/.profile to more easily start/stop MySQL until this bug is fixed.

alias start_mysql='sudo /usr/local/mysql/bin/mysqld_safe &'
alias stop_mysql='mysqladmin shutdown -uroot -p'

Start requires sudo password, stop requires root mysql password.
[29 Oct 2007 20:18] Andrew Hanna
Sorry, forgot to quickly mention how to use the above lines (for those who might not know).  Just open Terminal and type:

% stop_mysql 
Enter password: (Enter your MySQL Root password here)
% start_mysql 
Enter password: (Enter your OS X password here, you must be an Administrator)
[7 Nov 2007 0:29] Andrew Otto
"Is this perhaps because Leopard uses "_mysql" as the user, and the Preference Pane is
using "mysql"?"

No, I don't think so, but it is something related.  Starting mysqld from the command line fails also: 

$ mysqld
071106 18:29:15 [Warning] Can't create test file /usr/local/mysql-5.0.41-osx10.4-i686/data/qubit.lower-test
071106 18:29:15 [Warning] Can't create test file /usr/local/mysql-5.0.41-osx10.4-i686/data/qubit.lower-test
071106 18:29:15  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
[7 Nov 2007 0:44] Andrew Otto
Also, the same thing happens for 5.0.45...

$ mysqld
071106 18:38:44 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/qubit.lower-test
071106 18:38:44 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/qubit.lower-test
mysqld: Can't change dir to '/usr/local/mysql-5.0.45-osx10.4-i686/data/' (Errcode: 13)
071106 18:38:44 [ERROR] Aborting

071106 18:38:44 [Note] mysqld: Shutdown complete
[10 Nov 2007 12:35] Adam Penny
If you look at the _mysql user and group with dscl, they have 2 values for RecordName: _mysql and mysql. I deleted the RecordName _mysql on each and did sudo chown -R mysql /usr/local/mysql/data and automatic startup in the preference pane now works, although the start/stop button still doesn't work.
[11 Nov 2007 17:32] Joannou Ng
Instead of manually starting MySQL between reboots, use launchd, as outlined here:
[28 Nov 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[29 Jan 2008 20:35] Nikos Dimitrakopoulos
Any news on this one?
[14 Mar 2008 18:31] Sveta Smirnova
Thank you for the report and feedback.

I'll mark this as duplicate of bug #25008 and 28854 which are fixed and will be available in next release.