windows系统phpMyAdmnin登录mysql8.0报错

56 阅读1分钟

报错内容:

mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]

解决方案:

打开命令行工具:运行 -> cmd -> 回车

  1. 切换到mysql的bin目录下,输入自己的位置
cd C:\Program Files\MySQL\MySQL Server 8.0\bin
  1. 进入mysql
mysql -uroot -p

#这里需要输入密码
#Enter password:****
  1. 修改密码,把****改成密码
use mysql; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '****';

完成!!!