【解決方案】- phpmyadmin連線mysql時登入不了,提示mysqli_real_connect()

LarryHai6發表於2019-01-28

phpmyadmin連線mysql時登入不了,提示mysqli_real_connect()


現象

phpmyadmin連線mysql時登入不了,提示mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]並且登入不了mysql,用命令列可以登入.

解決方案

  1. 命令列登入mysql;
  2. mysql>use mysql;
  3. mysql>ALTER USER root IDENTIFIED WITH mysql_native_password BY '你的密碼';
  4. mysql>FLUSH PRIVILEGES;

 

相關文章