MySQL 8.0 Requested authentication method unknown to the client (caching_sha2_password)

Phil31971 picture Phil31971 · Nov 21, 2018 · Viewed 16.6k times · Source

Environment

  • Microsoft Windows 10.0.16299.15
  • PHP 7.2.11
  • MySQL Community Server 8.0.13
  • Symfony 4

I try to connect to MySQL database. When I

php bin/console doctrine:database:create

, I have this:

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]

Answer

Pmpr picture Pmpr · Nov 21, 2018

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.