8

After updating to macOS Catalina I’m not able to run MySQL with MAMP Pro. I get an error. Here from mysql_error.log

2019-10-09T10:53:16.6NZ mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error.log'.
2019-10-09T10:53:16.6NZ mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql57
2019-10-09T10:53:16.917470Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2019-10-09T10:53:16.919285Z 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.7.26) starting as process 3320 ...
2019-10-09T10:53:16.932570Z 0 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql57/ is case insensitive
2019-10-09T10:53:16.932669Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2019-10-09T10:53:16.932697Z 0 [ERROR] Aborting

2019-10-09T10:53:16.932751Z 0 [Note] Binlog end
2019-10-09T10:53:16.935298Z 0 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete

2019-10-09T10:53:16.6NZ mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended

I was searching the interenet and i’ve already tried a lot, but i can’t get it running.

Anyone experienced the same problem and could help?

Thx in advance!

2
  • have you tried following the suggestions in the manual at the "Security" section as stated in your question? Commented Oct 9, 2019 at 11:16
  • does this still work for you?
    – v3nt
    Commented Oct 21, 2019 at 8:44

3 Answers 3

29

I have a temporary fix, until the developers release a fix. I am using MAMP Pro; I don't know if the interface is the same in non-Pro. The temp fix:

Open MAMP Pro. Stop servers if they are running. Open the MySQL template from the menu: File > Edit Template > MySQL (mysql.cnf) > 5.7.26

  1. Scroll down or find [client]. Beneath [client] add the following line: user = root

  2. Scroll down or find [mysqld]. Beneath [mysqld] add the following line: user = root

  3. Start servers.

This worked for me. Hope it helps you.

2
  • Very nice! Thx a lot! Commented Oct 9, 2019 at 12:21
  • Unfortunately this didn't work for me. Anyone found an alternative fix?
    – v3nt
    Commented Oct 21, 2019 at 8:37
4

I had the same problem after installing Catalina on my Mac. First I have tried solution of Les Brown. Did not completely work for me. I got another error:

[Note] Access denied for user 'root'@'localhost' (using password: NO) 

After some reading I saw a video on youtube (https://www.youtube.com/watch?v=LKE1G4sinBM) which lets you add the keyword skip-grant-tables in the section mysqld of the MySql template of MAMP-PRO. That let mysql working, but is not the best idea to have forever in your template file. If your try to add the line, do not forget to remove it also!

Last but not least I got the hint of MAMP-Pro-support to make a symbolic link to the mysql.stock. So I executed in Terminal (the '$' is the prompt of terminal).

$ sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
Password:...
$

Now everything is working fine.

2
  • Thanks for this! My previous fix stopped working with the Catalina 10.15.2. Adding the following line below [mysqld] in the mysql template allows MySQL to start. I also created the symlink. All seems well for now.
    – Les Brown
    Commented Dec 19, 2019 at 14:44
  • I can confirm on Big Sur that Les Brown's fix, plus this one, fixes it. 🚀 The missing "following line below [mysqld]" in Les Brown's comment above is the same as Harm wrote on this answer: (by itself on a line:) skip-grant-tables
    – Matt Rabe
    Commented Dec 27, 2020 at 20:31
0

The answer from Les Brown helped me. I have one addition that may apply to you and others.

If MAMP (PRO) is accessing any directories in Documents or iCloud Drive, Catalina requires the user to approve MAMP's and/or MYSQL's access to that directory.

For instance, on one of my MAMP PRO servers, I run an ETL (using cron) that downloads csv files from a website, then loads data from each downloaded csv into specified MySQL tables in my testing database. The script wouldn't work, however, because MySQL did not have permission to access the downloaded csv files from the Documents directory. I had to run manually my ETL script from the command line. At that point, a MacOS modal popped up directing me to grant permission for MySQL to access Documents. Once I granted that permission, the ETL scripts began working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.