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).

66 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?

  18. Sarkis says:

    it worked ! but I have no clue what it means can you explain please.

  19. Asad says:

    Thanks a million… !!! :D

  20. Lisa says:

    WOW – thank you!!! This made my day.

  21. Jason says:

    Awesome! worked right away. Thanks!

  22. Anthony says:

    Thank you very much! Saved me a headache :)

  23. danwood@bu.edu says:

    THANK YOU

  24. Hardik says:

    Thanks a hips it’s solved my prob…

  25. Albert says:

    Thanks, that worked perfectly.

  26. Mike says:

    Worked the first time! Thanks a lot!

  27. Dan says:

    Helped me, thanks for this post!

  28. Worked right away! Thanks for sharing this, keep it up.

  29. Worked right away! Thanks, keep it up.

  30. noel says:

    you are AWESOME!

  31. anne says:

    awesome! it worked!

  32. Jeph says:

    Thank you!

  33. Peter says:

    Tried this but got this message— “WARNING: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your typing when using sudo. Type “man sudo” for more information.
    To proceed, enter your password, or type Ctrl-C to abort.” Any ideas?

  34. forest says:

    WORKED! Thanks!

  35. Abhijeet Wankhade says:

    Did everything.. yeah its still the same, not fixed. :|

  36. David says:

    No dice. Terminal says “No matching processes belonging to you were found”

  37. Steffan says:

    Fixed!!! Thanks!

  38. Nicholas Olivier says:

    I love you man :) worked perfectly

  39. Angry Old Man says:

    THANKS, that saved me hours of frustration

  40. Dan says:

    Very helpful! Thank you for posting this.

  41. Patrick Hansen says:

    This issue (MySQL Server NOT starting) happened to me when I installed MAMP after upgrading to 10.8 OS X Lion.

    I received the same message some others did, “No matching processes belonging to you were found,” after entering in the last command, but when I restarted MAMP, servers including the MySQL server started up fine. SO, I’m not sure if that message/error was consequential or not to the process, but it seems to be working fine now.

    Running MAMP 2.1.1 on OS X Lion 10.8.2

  42. Gemma says:

    Took two goes but then it worked. Thank you so much.

  43. JM says:

    That totally worked! You’re a genius :)

  44. Rod Salm says:

    Thank you, did the trick once I did the SUDO command.

  45. Harsh Arora says:

    Dude, I bow down to you. Thanks so much

  46. VAD says:

    Dude you rock! Thanks.

  47. Josh says:

    You Are a Genius!!!! Thank you!

  48. MAMP NOOB says:

    Thank You this saved me a lot of thread surfing.

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>