MacPorts mysql5-server not working on boot

If you’ve installed MacPorts’ mysql5-server, you may find that it doesn’t work after a restart.

This can be resolved by running the following commands to make sure you’ve killed off everything MySQL related.

sudo port unload mysql5-server
ps -ax | grep mysql
sudo kill 

Once you have done this, load it again.

sudo port load mysql5-server

Not it should be working. This is fine, but quickly gets very annoying every time you restart your computer! A common cause is that you have a MySQL sock file in your tmp directory. Removing this may allow it to start automatically.

cd /tmp
rm -f mysql.sock

Once removed, restart your computer and see if MySQL works first time – hopefully, it will.

Timeline

Newsletter

Don't have time to check my blog? Get a weekly email with all the new posts. This is my personal blog, so obviously it is 100% spam free.

Metadata

Tags: , , , ,

This entry was posted on Friday, February 22nd, 2013 at 8:16 am and is filed under Life, Tech. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.