客户端未知的MySQL 8.0请求的身份验证方法(caching_sha2_password) [英] MySQL 8.0 Requested authentication method unknown to the client (caching_sha2_password)

查看:384
本文介绍了客户端未知的MySQL 8.0请求的身份验证方法(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连接器

  • GO mysql连接器
  • PERL DBD-mysql连接器
  • 如果您想了解更多信息,可以查看 解决方案

    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.

    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屋!

    查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆