MAMP’s MySQL status red & not starting

MAMP is a good way to setup a low-maintenance dev envi­ron­ment for OS X in very lit­tle time, but its han­dling of MySQL is quite annoying.

When you suspend/sleep a com­puter, often when you resume MAMP has lost track of the MySQL instance it started and can no longer con­nect to it. Not sure if this is a prob­lem with the MySQL build being used, but as the prob­lem has existed since 2009, I don’t have high hopes for it being fixed any­time soon.

The quick­est solu­tion is to kill off the process it had started pre­vi­ously and then hit “Start Servers” again — it just takes one line on the terminal.

killall -9 mysqld

Be aware that this will kill all run­ning MySQL processes (includ­ing those out­side of MAMP’s control) — this is nor­mally fine, as no-one actu­ally hosts web­sites on OS X!

Tags: , , ,

posted on Monday, May 9th, 2011 at 9:15 am by Josh Street, filed under General.

4 Responses to “MAMP’s MySQL status red & not starting”

  1. Rohan says:

    Hi Josh

    Fancy see­ing this post #2 in google when I search “mamp sta­tus red”!

    Cool site!

  2. pacolo says:

    Thank you so much. It was dri­ving me crasy too.

    That’s work­ing so well.

  3. jtpack says:

    Thanks Josh! Extremely helpful.

  4. OMG, thank you so much, waisted hours on this and this fixed it in a second!

Leave a Reply