MySQL on Mac: Manager of pid-file quit without updating file

von

Usually MacPorts does everything you need if you want to install something on your mac:

port install mysql5

and then:

/opt/local/lib/mysql5/bin/mysql_install_db --user=mysql

should be everything you need.

But when I started mysql with:

/opt/local/share/mysql5/mysql/mysql.server start --user=mysql

A ridiculous error appeared:

Starting MySQL
...... ERROR! Manager of pid-file quit without updating file.

I have found an excellent blog post (meanwhile GONE), which helped me to find the error. I made an output of the data dir in the shell file, as he did, and found out on the mac the dir is:

/opt/local/var/db/mysql5/

Since it didn’t exist, I created it. Now MySql wrote an log file. But the error did no go. I have tried to copy that:

cp /opt/local/share/mysql5/mysql/my-small.cnf /etc/my.cnf

and override the data dir setting in the my.cnf file, but it seems this file is ignored. Even

/etc/mysql/my.cnf

is ignored.

However, through this config file and the log I was able to figure out that MySql is claiming about a missing socket file. The server expected it at:

/opt/local/var/run/mysql5

I created this directory too, and then - surprise - MySql came up. Not very comfortable. And I really hate it when my /etc/my.cnf is ignored. If you know, why please send me a comment. Sometime I feel the pain of the sys admins out there. What a nice life we programmers have.

Please note one thing, if your permissions are not correct, you’ll have the same error. Please make sure your user (in my case mysql) is having proper access rights.

Tags: #MySQL #Open Source #OS X

Newsletter

ABMELDEN