thumb

On my macOS devices I use MAMP PRO app by appsolute GmbH for local web development. So far, this is the perfect app for me to have a local server environment. But sometimes there are problems such as the following error message when I try to start the servers:

MySQL wasn't able to start. Please check log for more information


I’m using version 4.2.1 of the MAMP PRO app, but in your case there can be any other version of the MAMP app. If you use the non-standard version of the application, but the PRO one, then in the following steps, replace “MAMP” with “MAMP PRO”, respectively.

What causes this problem

The reasons for the problems with running MySQL server can be different in different cases. The most common problems with MySQL server not starting are the following:

  1. Another mysql service running on the same port.
  2. The current user not having permissions to the file.
  3. The log file is corrupted.
  4. The database is corrupted.

To find out the exact cause of the problem, you need to look in the MySQL log file located in /Applications/MAMP/logs/ or /Library/Application Support/appsolute/MAMP/logs/.

How to solve it

I have encountered this problem on many occasions, and in most cases the following solutions work:

  1. Kill other MySQL processes running. (Solution №1 and №2)
  2. Rename or delete the MySQL log files. (Solution №3 and №4)



In this solution we will use the Activity Monitor app. You do not need to download and install anything, because it is already built into every macOS.

  1. Quit MAMP app.

  2. Launch the Activity Monitor app from the Utilities folder of your Applications folder, or use Spotlight to find it.

  3. Type mysqld into the search field on the top right.

  4. Quit every process you find after your search.

  5. Launch MAMP and click the Start servers button.



This is another method to do the same thing as in the previous solution (№1), but with use the Terminal app. You do not need to download and install anything, because it is already built into every macOS.

  1. Quit MAMP app.

  2. Launch the Terminal app from the Utilities folder of your Applications folder, or use Spotlight to find it.

  3. Enter the command below to show any MySQL processes currently running.
    pgrep mysql
    

    Note! This is an optional step, you can skip it.

  4. Enter the command below to kill MySQL processes.
    killall -9 mysqld
    

    Note! If you get the following message No matching processes belonging to you were found then try add sudo to the command above so you get the following sudo killall -9 mysqld. It will ask for the administrator password.

  5. To verify that they no longer exist, repeat the pgrep command and you should not have any processes returned.
    pgrep mysql
    

    Note! This is an optional step, you can skip it.

  6. Launch MAMP and click the Start servers button.



In this solution we will use the Finder. You do not need to download and install anything, because it is already built into every macOS.

  1. Quit MAMP app.

  2. In the Finder, go to the folder Applications -> MAMP -> db -> mysql56.

    Note! The path to these files may be different on your system. Try the following variants:
    1) /Applications/MAMP/db/mysql56/
    2) /Library/Application Support/appsolute/MAMP/db/mysql56

  3. Rename the two log files ib_logfile0 and ib_logfile1 to ib_logfile0_bak and ib_logfile1_bak. Both of these files will be automatically rebuilt by MAMP.

    Note! Don’t delete these two files as you may need to return to them.

  4. Launch MAMP and click the Start servers button.



This is another method to do the same thing as in the previous solution (№3), but with use the Terminal app. You do not need to download and install anything, because it is already built into every macOS.

  1. Quit MAMP app.

  2. Launch the Terminal app from the Utilities folder of your Applications folder, or use Spotlight to find it.

  3. Enter the command below to rename the two log files ib_logfile0 and ib_logfile1 to ib_logfile0_bak and ib_logfile1_bak. Both of these files will be automatically rebuilt by MAMP.
    mv /Applications/MAMP/db/mysql56/ib_logfile0 /Applications/MAMP/db/mysql56/ib_logfile0_bak
    mv /Applications/MAMP/db/mysql56/ib_logfile1 /Applications/MAMP/db/mysql56/ib_logfile1_bak
    

    Note! The path to these files may be different on your system. Try the following variants:
    1) /Applications/MAMP/db/mysql56/
    2) /Library/Application Support/appsolute/MAMP/db/mysql56
    Note! Don’t delete these two files as you may need to return to them.

  4. Launch MAMP and click the Start servers button.

Conclusion

That’s it! Now the MAMP should start the MySql server without errors. If you are having trouble fixing this issue with the instructions above, but are being able to solve this problem with any another method please describe it in the comment section below. Thanks!


If this article helped you solve the problem then please leave a comment. :smiley:

Thanks for reading!

Arthur Gareginyan
Arthur Gareginyan

Arthur is a designer and full stack software engineer. He is the founder of SpaceX-Chimp and the blog MyCyberUniverse.com. His personal website can be found at arthurgareginyan.com.

Follow Arthur: