【PHP】SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client搜索了下应该是 MySQL 8默认使用了新的密码验证插件:caching_sha2_password ,而有些 PHP 版本不支持这个问题造成的解决办法:修改登录用户的 plugin 为 mysql_native_passwordmysql -uroot -puse mysql;ALTER USER 'root'@'l.
原创
2020-12-21 13:46:47 ·
3380 阅读 ·
2 评论