How to Fix MAMP When the MySQL Server Won’t Start

If your MAMP control panel refuses to show anything but a red light for the MySQL server, you will no longer be able to serve your database-backed application. This seems to happen often after MAMP fails to shut down a no longer useful instance of MySQL, which prevents a new process from taking over.

To fix this, we simply kill the old MySQL process in the Terminal (Applications > Utilities > Terminal).
Killall command in Mac OSX Terminal

  1. Quit MAMP.
  2. Enter in terminal: killall -9 mysqld
  3. Start MAMP.



Your MySQL server is hopefully back up and running now. Tada!

If you are not familiar with the terminal, or Terminal.app, it’s the text-based command line interface for the UNIX operating system that underlies OSX. It is very useful to become familiar with if you’re getting to developing. The command entered sends the KILL signal to all processes called “mysqld”, which will allow MAMP to start a fresh SQL server (still using your same stored database).

If you’re not familiar with MAMP, it’s a packaged web stack that will allow you to develop and test Apache/PHP/MySQL web-apps on your Mac with the bare minimum of setup and installation hassle. Besides the above mentioned quirk, it usually works pretty flawlessly, and it’s excellent for folks developing WordPress themes and plugins.

The fix here adds nothing new to the one listed at Time Wasted On Binaries. It’s five years since that post and MAMP is still regularly fouling up, so I’d like to recapitulate this information here and ensure it never vanishes from the web.

Could the MAMP developers perhaps boost the robustness of their application by having MAMP detect when MySQL server isn’t connecting properly, and automate this procedure? I’d love to see this in a future version of MAMP, but considering the prevalence and age of this problem, I’m not going to hold my breath.

2 Comments

  1. Daniel

    Thank you thank you thank you!! I can now reinstall WordPress after hours of trying to fix this issue!!

  2. Thank you this worked like a charm.

Leave a Reply

CommentLuv badge