2010
24
May

How To Resolve MySQL Not Starting In MAMP

I use MAMP daily. I love MAMP. I recently discovered how truly awesome MAMP Pro is too. But that’s a story for another time. I recently upgraded from MAMP 1.8.4 to 1.9. When I got MAMP 1.9 installed I started the servers. Apache came up but MySQL didn’t want to. I tried shutting down both servers and starting it back up again, which didn’t work.

Thankfully, there is a pretty simple fix. To begin with, make sure MAMP is shut down. Next, open Terminal. To open Terminal either open Spotlight (Cmd+Space) and type “terminal” or you can find Terminal in the /Applications/Utilities/ folder.

Once you get Terminal opened, type the following:

ps aux | grep mysql 
lsof -i 
killall -9 mysqld

That’s it. Start up MAMP and MySQL will come back up just like normal. Another option would be to simply change the port number MySQL is using in MAMP. Restarting your computer may work too but I did’t try that.

[Edit May 5, 2012] Very, very late response to a couple of the comments. If this isn’t working for you, you may have to use sudo. In Terminal, type “sudo killall -9 mysqld” (without the quotes). This will allow you to kill the mysqld process with security privileges of another users (such as root).

18 Responses to How To Resolve MySQL Not Starting In MAMP

  1. Caroline says:

    Thanks – this fixed INSTANTLY! Keep up the killa posts!!!!

  2. Robo says:

    Nice one… took a couple of attempts but I was 3rd time lucky… Thanks

  3. andrew says:

    Wow… I wish I would have found this an hour ago! Just came across it while downloading Xampp for Mac, and was about to drop MAMP. Thanks to this, I’m up and running!

  4. Richie says:

    Your a legend!!! :)

  5. Excellent! I was having trouble with MAMP killing my MySQL server every once in a while for no reason, but this is definitely a much shorter solution than having to restart your computer (yes, that works).

  6. Kay Edstene says:

    Wow! and thank you. Worked like a charm.

  7. sas1ni69 says:

    Hi there. Thanks a lot but what do the commands actually mean?

  8. Joe says:

    Many thanks. Saved me a lot of time.

  9. arnie says:

    Amazing! Worked like a charm. Thanks.

  10. Rains says:

    Thank you! This worked perfectly!

  11. Ciro says:

    Having the same problem, found your post, working now… happy! :)

  12. Tamara says:

    You’re a genius. Thank you so much!

  13. Nicolas says:

    Gracias !!! perfecto, me salvo mucho tiempo !!!!

  14. jake says:

    nope, did not work for me…..

  15. Jan Cavan says:

    Out of all the recommended solutions out there, this was the only one that worked! Great job! Thanks!

  16. Brian says:

    it worked for me after i reset my ports to default apache and mysql

  17. anvc says:

    I get a message “No matching processes belonging to you were found” when i put “killall -9 mysqld” in Terminal. Can you help please?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">