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

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

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



        
11条回答
  •  孤独总比滥情好
    2020-11-22 03:55

    ALTER USER 'mysqlUsername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysqlUsernamePassword';
    

    Remove quotes (') after ALTER USER and keep quote (') after mysql_native_password BY

    It is working for me also.

提交回复
热议问题