mysql: 报错:SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

一,报错信息

SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

二,原因

SHOW VARIABLES LIKE 'default_authentication_plugin';

返回:

Variable_name Value  
default_authentication_plugin caching_sha2_password

三,解决:

php客户端改为7.4.4以上,这里我安装了:7.4.33,问题解决

官方文档:

https://www.php.net/manual/zh/mysqli.requirements.php

 

posted @ 2025-09-27 17:06  刘宏缔的架构森林  阅读(7)  评论(0)    收藏  举报