MySQL not starting after installing and starting MAMP on Mac OSX Lion

March 6th, 2013

When  I am doing Wordpress development, I setup local installation for dev purposes. So at some point of time on my mac, I had installed mysql. Recently I wanted to try MAMP to see if it is easier to set up the dev environment especially for  devs who want to get started with Apache, PHP and Mysql. So installed MAMP and after starting it, I had this problem where Apache is starting but Mysql is not. Looking at MAMP error log, I can see that it is having generic problem of socket connection error.

After stumbling and retracing what I have done to make mysql work on machine , I remembered that in my /private/etc folder, I need to place my.cnf file to overcome the socket error I was getting when I installed mysql by itself. I got rid of that file and boom the mysql started both on MAMP default ports and mysql default port.

So if you have installed mysql in the past and want to play with MAMP on your max osx lion and having issues with MAMP’s mysql, try getting rid of my.cnf file in the /private/etc folder.

Back to playing with MAMP.