Navicat Premium 连接MySQL数据库出现Authentication plugin 'caching_sha2_password' cannot be loaded的解决方案

时间:2022-10-30 16:43:28

1. 管理员权限运行命令提示符,登陆MySQL

  mysql -u root -p

  root

2. 修改账户密码加密规则并更新用户密码

   ALTER USER 'root'@'localhost' IDENTIFIED BY 'root' PASSWORD EXPIRE NEVER;     #修改加密规则

    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';     #更新一下用户的密码

3. 刷新权限并重置密码

  FLUSH PRIVILEGES;    #刷新权限

  alter user 'root'@'localhost' identified by '111111';    #再重置下密码