原文:php连接mysql报错The server requested authentication method unknown to the client

php . 连接mysql . 报错:The server requested authentication method unknown to the client 是因为mysql 使用了新的密码验证插件:caching sha password,而在php . 并不支持这种方式。 解决办法: .升级php .修改mysql的配置文件,my.ini 找到mysqlId下的default aut ...

2020-06-05 20:10 0 2666 推荐指数:

查看详情

The server requested authentication method unknown to the client

对于这个问题,我看了很多文章,基本上都是清一色的修改mysql配置,然后再用命令行设置,而出现这种问题的原因是因为这个: 发生这种错误,是由于MySQL 8默认使用了新的密码验证插件:caching_sha2_password,而之前的PHP版本中所带的mysqlnd无法支持这种验证 ...

Fri Sep 20 21:04:00 CST 2019 0 800
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM