php mysqli_connect: authentication method unknown to the client [caching_sha2_password]

前端 未结 11 2406
遥遥无期
遥遥无期 2020-11-22 03:40

I am using php mysqli_connect for login to a MySQL database (all on localhost)



        
11条回答
  •  故里飘歌
    2020-11-22 04:07

    As of PHP 7.4, this is no longer an issue. Support for caching_sha2 authentication method has been added to mysqlnd.


    Currently, PHP mysqli extension do not support new caching_sha2 authentication feature. You have to wait until they release an update.

    Check related post from MySQL developers: https://mysqlserverteam.com/upgrading-to-mysql-8-0-default-authentication-plugin-considerations/

    They didn't mention PDO, maybe you should try to connect with PDO.

提交回复
热议问题