MacPorts and The server quit without updating PID file

I just upgraded from OS X Mavericks to Yosemite, and then went through the process of updating my MacPorts ports. Everything went cleanly until I tried to start MySQL. I received the message:

The server quit without updating PID

Searching for an answer gave plenty of articles suggesting that the file mentioned after that error message needed to be created, that permissions were wrong, and other things surrounding issues regarding the pid file. None of those turned out to be the cause.

In the directory that is being checked for the PID file, a file of the same name, but with the suffix .err had been created. That file revealed an even more confusing message:

mysqld: Table 'mysql.plugin' doesn't exist

I searched about this, as well, and found many more articles about things that didn't apply, such as needing to run some processes that are actually meant for a new implementation, which this was not. Even the error file, itself, suggested running mysql_update, which also wasn't the solution.

In my case, the problem turned out to be that even though I had the mysql port installed, my system had never used it. Instead, I must have installed MySQL before starting to use MacPorts. When both are present, and both have config files present, the native one will be selected first.

How to know? Simply type the following in a terminal window:

which mysql

If the return is in /usr/local instead of /opt/local, where the port goes, you're probably using the native version. I started it via the MySQL tab in System Preferences, and all is well. I'll export my databases, remove the native my.cnf file and get the ports version running, import my databases, and all should be well.


It seems that forcing the use of the MacPorts implementation when the other is present is problematic. Trying to kill the msyqld process results in it starting again, immediately. Will post the answer once I find the solution.



by Clemens (not verified) on Mon, 2014-12-29 08:58

You should start the MacPorts MySQL server using `sudo port load mysql56-server` (obviously replacing the version number with the version you have installed). That will ensure the MacPorts version is started with the MacPorts binary and its corresponding configuration file. Since the MacPorts installation will by default not bind to a network port, but only to a unix socket under `/opt/local`, it should not conflict with your 3rd-party installation. Note that since `sudo port load` uses launchd, it will keep the process running even after a reboot. To stop, run `sudo port unload mysql56-server`.

See also the output of `port notes mysql56-server`.

Also, while previewing this comment, I saw: "Notice: Undefined index: format in comment_preview() (line 2075 of /home/PRIVATE/public_html/drupal/d7/modules/comment/comment.module)." Additionally, it's really hard to post properly formatted comments here – I cannot even create paragraphs using empty lines, it seems.

by j ayen green on Sat, 2015-01-03 00:23

Thanks for the tip. That worked well once I removed all traces of the other installation of MySQL. I think the comment issue is resolved, and I added markdown compatibility as well.

©2005-2017 Ayen Designs. Underlying theme by Kiwi Themes.