brew install mysql, error when trying to stop the server


brew install mysql

and I try to stop the MySQL server:

$ mysql.server stop
Shutting down MySQL
.. ERROR! Manager of pid-file quit without updating file.

How can I fix the above error? Thanks!


$ mysql -v
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.1.51 Source distribution


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

The install instructions for mysql suggest copying /usr/local/Cellar/mysql/5.1.54/com.mysql.mysqld.plist to ~/Library/LaunchAgents so that Mac OS X will automatically launch mysqld when you login.

If you’ve set up mysqld this way then the launchd process, which controls LaunchAgents in Mac OS X v10.4 and above, will automatically restart the mysqld process as soon as it is being killed by the mysql.server stop command. This might be the reason for the error message, because the server is being automatically restarted.

Just tested this on my Mac. Ran the mysql.server stop command ten times and each time ‘launchd’ restarted the msyqld process after about a second. Six times the command ended with a “SUCCESS!” message. Four times it ended with the “ERROR! Manager of pid-file quit without updating file” message.

UPDATE: Just realised I didn’t mention how to stop the mysqld server if it is being started by launchd.

Here is the command to stop the mysqld daemon.

launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

Method 2

Have you tried running killall mysqld?

Method 3

Give this a try..

  1. Navigate to the problem’s parent directory cd YOURPATH/usr/local/mysql
  2. rm -rf *.local.err (deletes file)
  3. touch (generates new * file the error thrown was complaining about)
  4. cd back into your project and restart mysql using mysql.server start

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x