If you are using MAMP to serve as your local web installation on your Mac, you may experience an occasional issue where you can start the Apache Server but not the MySQL Server. I am still trying to determine the cause for this aggravation – I see it almost every time I crank up my web server. Never fear, there is a quick fix to get you back on track.
From my limited understanding, the cause of this is a “left over” mysql process that is still running – most likely initiated during a previous MAMP session. Because MAMP sees a mysql process already running, it won’t start a new one. In order to start a new MySQL Server process in MAMP, we need to stop the “old” one.
All you need to do is start a session in Terminal by either navigating to your Applications->Utilities folder and opening terminal.app or using Spotlight to search for Terminal.
Once you have Terminal up, you only need to type the following command at the blinking cursor prompt:
killall -9 mysqld
Hit ‘Enter’ and this command will stop (kill) any mysql processes that are currently running. You should now be able click the “Start Servers” button and get green lights for both services.