简体   繁体   中英

Apache not working after macOS Catalina update

Every time macOS is upgraded to a new major version then php, apache or mysql stops working. This happens again with Catalina too. I faced issue in starting apache and mysql. Mysql started to fail as

[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

I am posting the solution I performed for starting mysql as well as apache, php on macOS Catalina.

First, I have gone through the steps which I have shared earlier for Mojave. Apache not working after macOS Mojave update

As I am using PHP 5.6 so I needed libphp5.so to make PHP 5.6 work after macOS upgrade. As before installing catalina, apache/php/mysql was working fine so I have the library already alavailable. I found the .so file using below command and updated the same in "/etc/apache2/httpd.conf"

sudo find / -name libphp5.so

after finding the file, I updated the same with path in /etc/apache2/httpd.conf

LoadModule php5_module 
/usr/local/Cellar/php@5.6/5.6.25_1/libexec/apache2/libphp5.so

This makes the PHP 5.6 working but still mysql was failing with below error. "[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!"

As it is my development area only so I simply did following: 1. goto the mysql installation bin directory

 cd /usr/local/mysql-5.6.25-osx10.8-x86_64/bin
  1. run the mysql with root as user.

    sudo ./mysqld --user=root

it started the mysql too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM