I have installed mysql via brew. First start works, but after reboot, I got the following error:
The server quit without updating PID file (/usr/local/var/mysql/NAME.pid)
I start mysql with
sudo mysql.server restart
If I try to create a pid file on my own via terminal it will created, but after a few seconds it disappear.
sudo touch /usr/local/var/mysql/NAME.pid
Have anyone a idea?
Best Answer
YES.
Following homebrew caveats, did you setup launchd?
Well, now using
mysql.server
is pointless. It basically doesn't work, because (from my poor understanding) mysqld is now managed by launchd, and it ismysqld_safe
. I don't know if actually because of that is different from what you control withmysql.server
.The solution I came up with is to not use launchd for mysql from brew. Rather, I just use the
mysql.server
tool to start, stop, and restart mysql.If you want to follow my steps, this is what you need to do:
And whenever you want to start the mysql server, use
mysql.server start
.If you actually want to make mysql start at boot time, you can take that plist and copy it, delete the KeepAlice line, replace the string values under
ProgramArguments
with/usr/local/bin/mysql.server
andstart
. After that dolaunchctl load ~/path/to/com.file.plist