Search code examples
mysqlmacosmampvirtualhost

MAMP Pro Error: The MySQL configuration file my.cnf couldn't be written


I tried to use MAMP Pro to replace previous XAMPP on my Mac due to its easy Virtual Hosts management. However after I installed it. The MAMP, basic version works, but the Pro version keeps given me this error message:

The MySQL configuration file my.cnf couldn't be written.

I googled for a while and there are some different solutions, like create my.cnf on /etc/, but none of these works. Also the error log is empty.

Has someone encountered this before? Or does anyone have a clue how could I solve this problem? Thank you!


Solution

  • I just purchased MAMP PRO and I'm having this error as well. Here's what "fixed" it:

    1. Open Terminal and type in sudo killall -9 mysqld. You might see "No matching processes belonging to you were found," which is fine, it means that MySQL was not running.
    2. Now, in Applications, look for the regular MAMP folder. Open MAMP here and click Start Servers
    3. Now open MAMP PRO and the servers should be started

    This is just a work-around, it definitely should not require these. At the very least, this should get you up and running.

    Contacting support!