My attempts to upgrade homebrew PHP 7.3.12 to PHP 7.4.0 have failed.
(我尝试将自制的PHP 7.3.12升级到PHP 7.4.0失败。)
Here's what I did:
(这是我所做的:)
brew update
sudo brew services stop php
brew upgrade
brew cleanup
brew doctor
sudo brew services start php
brew services list
sudo reboot now
Here's what I expected:
(这是我的期望:)
The server to come back up as expected.
(服务器将按预期恢复。)
Here's what happened:
(这是发生了什么:)
WordPress 5.3 frontend and backend both report the dreaded "Error establishing a database connection" error.
(WordPress 5.3前端和后端均报告可怕的“建立数据库连接错误”错误。)
phpMyAdmin reports the following three errors:
(phpMyAdmin报告以下三个错误:)
- Cannot log in to the MySQL server
(无法登录MySQL服务器)
- mysqli_real_connect(): Unexpected server response while doing caching_sha2 auth: 109
(mysqli_real_connect():进行caching_sha2认证时服务器意外响应:109)
- mysqli_real_connect(): (HY000/2006): MySQL server has gone away
(mysqli_real_connect():(HY000 / 2006):MySQL服务器已消失)
Here's what I did next:
(这是我接下来要做的:)
Ensured correct username and password for MySQL.
(确保MySQL的用户名和密码正确。)
Ensured correct hostname. (确保正确的主机名。)
Ensured MySQL is running: (确保MySQL正在运行:)
mysqladmin -u root -p status
Enter password:
Uptime: 173 Threads: 2 Questions: 3 Slow queries: 0 Opens: 113 Flush tables: 3 Open tables: 35 Queries per second avg: 0.017
Additional information:
(附加信息:)
My httpd log reports nothing unusual:
(我的httpd日志报告没有异常:)
[Sat Nov 30 20:53:48.021678 2019] [mpm_prefork:notice] [pid 140] AH00163: Apache/2.4.41 (Unix) OpenSSL/1.1.1d configured -- resuming normal operations [Sat Nov 30 20:53:48.021785 2019] [core:notice] [pid 140] AH00094: Command line: '/usr/local/opt/httpd/bin/httpd -D FOREGROUND'
([2019年11月30日星期六20:53:48.021678] [mpm_prefork:notice] [pid 140] AH00163:已配置Apache / 2.4.41(Unix)OpenSSL / 1.1.1d-恢复正常操作[11月30日星期六20:53:48.021785 2019] [core:notice] [pid 140] AH00094:命令行:'/ usr / local / opt / httpd / bin / httpd -D FOREGROUND')
Similarly, my MySQL log reports nothing unusual:
(类似地,我的MySQL日志报告没有异常:)
2019-12-01T03:07:00.6NZ mysqld_safe Logging to '/usr/local/var/mysql/moriarty.local.err'.
(2019-12-01T03:07:00.6NZ mysqld_safe登录到'/usr/local/var/mysql/moriarty.local.err'。)
2019-12-01T03:07:00.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql 2019-12-01T03:07:02.994684Z 0 [System] [MY-010116] [Server] /usr/local/opt/mysql/bin/mysqld (mysqld 8.0.18) starting as process 398 2019-12-01T03:07:03.012177Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive 2019-12-01T03:07:06.203718Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. (2019-12-01T03:07:00.6NZ mysqld_safe使用/ usr / local / var / mysql中的数据库启动mysqld守护进程2019-12-01T03:07:02.994684Z 0 [系统] [MY-010116] [服务器] / usr /本地/ opt / mysql / bin / mysqld(mysqld 8.0.18)作为进程398开始于2019年12月12日-T03:07:03.012177Z 0 [警告] [MY-010159] [服务器]设置lower_case_table_names = 2因为文件系统用于/ usr / local / var / mysql /不区分大小写2019-12-01T03:07:06.203718Z 0 [警告] [MY-010068] [服务器] CA证书ca.pem是自签名的。)
2019-12-01T03:07:06.277615Z 0 [System] [MY-010931] [Server] /usr/local/opt/mysql/bin/mysqld: ready for connections. (2019-12-01T03:07:06.277615Z 0 [系统] [MY-010931] [服务器] / usr / local / opt / mysql / bin / mysqld:准备连接。)
Version: '8.0.18' socket: '/tmp/mysql.sock' port: 3306 Homebrew. (版本:'8.0.18'套接字:'/tmp/mysql.sock'端口:3306 Homebrew。)
2019-12-01T03:07:06.337877Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. (2019-12-01T03:07:06.337877Z 0 [系统] [MY-011323] [服务器] X插件可供连接。)
Socket: '/tmp/mysqlx.sock' bind-address: '127.0.0.1' port: 33060 (套接字:'/tmp/mysqlx.sock'绑定地址:'127.0.0.1'端口:33060)
ask by Michael Fraase translate from so