+-

环境
> 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
, 我有这个:
An exception occurred in driver: SQLSTATE[HY000][2054] The server requested authentication method unknown to the client
PDO::_construct(): The server requested authentication method unknown to the client [caching_sha2_password]
最佳答案
您可以检查 Upgrading to MySQL 8.0 : Default Authentication Plugin Considerations以获取有关升级到8.0的重要说明的信息,您将在其中找到:
At the time of writing this post, following connectors do not have support for caching_sha2_password.
07001 GO mysql connector PERL DBD-mysql connector
如果您想了解更多信息,可以查看MySQL官方文档中的caching_sha2_password as the Preferred Authentication Plugin.
因此,我认为即将升级到MySQL 8.0,并且您可能会考虑降级或等待一些时间来升级php mysql扩展.
点击查看更多相关文章
转载注明原文:客户端未知的MySQL 8.0请求的身份验证方法(caching_sha2_password) - 乐贴网