wp无法访问,nginx报错

wrodpress 搭建后正常访问,后面对数据库进行过迁移,数据库地址未更新,旧数据库失效后网站访问不了,nginx报错如下

2022/01/17 22:55:26 [error] 15651#0: *11 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 115.183.85.216, server: www.iplamp.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "www.iplamp.com"

问题二

数据库又原来的5.7迁移到8.0,由于密码验证格式不一样,wp无法连接到mysql8.0

修改密码验证格式

cat /etc/my.cnf
[mysqld]
default_authentication_plugin=mysql_native_password
mysql> select User,Host,plugin from mysql.user;
+------------------+-----------+-----------------------+
| User             | Host      | plugin                |
+------------------+-----------+-----------------------+
| username         | %         | caching_sha2_password |

mysql> alter user 'username'@'%' identified with mysql_native_password by 'password';

你可能感兴趣的:(wp无法访问,nginx报错)