客户端未知的MySQL 8.0请求的身份验证方法(caching_sha2_password) [英] MySQL 8.0 Requested authentication method unknown to the client (caching_sha2_password)
问题描述
环境
- Microsoft Windows 10.0.16299.15
- PHP 7.2.11
- MySQL Community Server 8.0.13
- Symfony 4
我尝试连接到MySQL数据库.当我
php bin/console doctrine:database:create
,我有这个:
驱动程序中发生异常:SQLSTATE [HY000] [2054]服务器请求了客户端未知的身份验证方法
PDO :: _ construct():服务器请求了客户端[caching_sha2_password]未知的身份验证方法
您可以检查 PHP mysqli连接器
如果您想了解更多信息,可以查看 解决方案
You may check Upgrading to MySQL 8.0 : Default Authentication Plugin Considerations to get information about important notes on upgrading to 8.0 where you will find:
At the time of writing this post, following connectors do not have support for caching_sha2_password.
- PHP mysqli connector
- GO mysql connector
- PERL DBD-mysql connector
If you want to know more, you may check caching_sha2_password as the Preferred Authentication Plugin on MySQL official documentation.
So, I think that's soon to upgrade to MySQL 8.0 and you may consider downgrade or wait some time for php mysql extension to be upgraded as well.
这篇关于客户端未知的MySQL 8.0请求的身份验证方法(caching_sha2_password)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!