How to fix: MySQL not starting on MAMP (Pro)

I recently had to install MAMP Pro, in order to do some separate work from my Laravel Homestead VM.

After a weird Mac crash, MAMP would no longer start the MySQL server. This was the data from the logs:

To fix this, go to MAMP, File > Edit Template > MySQL > [version] and add the line highlighted below.

# The MySQL server
[mysqld]
innodb_force_recovery = 1

The restart the server. After this you can comment out that line. Hopefully you will now be able to run the server again.

18 Comments

Another Ari 7 October 2017 Reply

Thank you, you’re a lifesaver.

This is the second time this has happened to me (first time I had to reinstall and lose all my data), but this time I looked up the logs and found your post

Nacho 7 October 2017 Reply

Glad it helped :)

famousartguy 11 October 2017 Reply

I tried /Library/Application Support/appsolute/MAMP PRO/db/mysql56 renaming the log files…did not work. THIS worked beautifully! Thank you!

kari 7 November 2017 Reply

BLESS YOU! Been spinning my wheels on this all day!

EJ 19 November 2017 Reply

Thank you! No other solution has worked for me.

tony 30 November 2017 Reply

Worked perfectly for me – thanks! I had previously tried to uncomment the same command further down the file – without success!

tainui 13 December 2017 Reply

thanks so much … you saved my day !

David 23 December 2017 Reply

Great, thanks to you I’am able to work again, great article. Take care

Mimi 11 January 2018 Reply

There are no such thing as a stupid question right? ..how do I go to “File > Edit Template > MySQL > [version]” in MAMP ? I cant figure it out ..

Nacho 11 January 2018 Reply

haha, you’re 100% correct! Here, see this screenshot. You should see something similar.
I’ll update the post if this is useful.

https://uploads.disquscdn.com/images/2c0f059acca5d4cc7fbdedcdeb0db8c840c1db661dfadb09645d05ecdeb07efb.png

Andy 1 February 2018 Reply

Thanks for this, worked perfect!

colinlord 2 February 2018 Reply

Like others have said, thank you!

Matt 23 April 2018 Reply

For anyone not using MAMP Pro, just create a my.cnf file in:
MAMP > conf

Copy and paste the line Nacho provides in his post, save and then start MAMP.

My MAC crashes occasionally and I always have problems starting MySQL (normally have to resort to restoring really old databases), however this force recovery fix solves this in an instant.

So glad I happened across this post

Tim 9 May 2018 Reply

Thank you very much!

jeffumlautJeff 6 August 2018 Reply

Nacho, Thank you so much. Saved my bacon…

Ignacio 22 August 2018 Reply

ha! Good to hear :)

Piper Haywood 15 October 2018 Reply

thanks for this, super helpful

Ignacio 17 April 2019 Reply

Glad it helped!

Leave a Reply to colinlord Cancel reply