[英]Apache not working after macOS Catalina update
Every time macOS is upgraded to a new major version then php, apache or mysql stops working.每次 macOS 升级到新的主要版本时,php、apache 或 mysql 都会停止工作。 This happens again with Catalina too.
这也发生在 Catalina 身上。 I faced issue in starting apache and mysql.
我在启动 apache 和 mysql 时遇到了问题。 Mysql started to fail as
Mysql 开始失败
[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
[错误] 致命错误:请阅读手册的“安全”部分以了解如何以 root 身份运行 mysqld!
I am posting the solution I performed for starting mysql as well as apache, php on macOS Catalina.我正在发布我为在 macOS Catalina 上启动 mysql 以及 apache、php 而执行的解决方案。
First, I have gone through the steps which I have shared earlier for Mojave.首先,我已经完成了之前为 Mojave 分享的步骤。 Apache not working after macOS Mojave update
macOS Mojave 更新后 Apache 无法正常工作
As I am using PHP 5.6 so I needed libphp5.so to make PHP 5.6 work after macOS upgrade.因为我使用的是 PHP 5.6,所以我需要 libphp5.so 来让 PHP 5.6 在 macOS 升级后工作。 As before installing catalina, apache/php/mysql was working fine so I have the library already alavailable.
和安装 catalina 之前一样,apache/php/mysql 工作正常,所以我已经有了可用的库。 I found the .so file using below command and updated the same in "/etc/apache2/httpd.conf"
我使用以下命令找到了 .so 文件并在“/etc/apache2/httpd.conf”中更新了相同的文件
sudo find / -name libphp5.so
after finding the file, I updated the same with path in /etc/apache2/httpd.conf找到文件后,我用 /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.这使得 PHP 5.6 工作但仍然 mysql 失败并出现以下错误。 "[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!"
“[错误] 致命错误:请阅读手册的“安全”部分以了解如何以 root 身份运行 mysqld!”
As it is my development area only so I simply did following: 1. goto the mysql installation bin directory由于它只是我的开发区,所以我只是做了以下操作: 1.转到mysql安装bin目录
cd /usr/local/mysql-5.6.25-osx10.8-x86_64/bin
run the mysql with root as user.以 root 用户身份运行 mysql。
sudo ./mysqld --user=root须藤 ./mysqld --user=root
it started the mysql too.它也启动了mysql。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.