wordpress-mysql8-caching_sha2_password问题
2019-03-271、您的 PHP 似乎没有安装运行 WordPress 所必需的 MySQL 扩展,重新编译php
#--with-mysql=mysqlnd \ 这个好像不支持
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd
configure: WARNING: unrecognized options: --with-mysql, --with-mcrypt, --with-curlwrappers, --enable-gd-native-ttf
/opt/LNMP
2、建立数据库连接时出错phpmyadmin显示错误:
mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]
客户端不支持caching_sha2_password的加密方式,需要升级。
mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client
a).到 my.cnf 的[mysqld]部分修改密码加密方式,
添加 default_authentication_plugin = mysql_native_password
b).输入mysql并通过执行类似操作创建新用户 CREATE USER 'root'@'localhost' IDENTIFIED BY 'password';
alter user root@'localhost' identified with mysql_native_password by '123456';
alter user wallcopper@'localhost' identified with mysql_native_password by '123456';
flush privileges;
c).必要时授予权限。呃 GRANT ALL PRIVILEGES ON * . * TO 'root'@'localhost'; 然后 FLUSH PRIVILEGES;
3、MySQL includes a mysql_native_password pluginthat implements native authentication; that is, authenticationbased on the password hashing method in use from before theintroduction of pluggable authentication.
4、WordPress has detected that your site is running on an insecure version of PHP.升级到7.3