MySQL 8.0 error 2059: Authentication plugin 'caching

xiaoxiao2025-08-20  32

安装MYSQL8.0+版本之后,使用可视化管理工具Workbench或者Navicat都会产生一个类似的报错。

原因:MYSQL8.0之前的版本中加密规则为mysql_native_password. 而mysql8之后的加密规则为caching_sha2_password.

解决办法: 打开CMD进入MYSQL,执行下面的命令 alter user ‘root’@‘localhost’ identified by ‘123456’ password expire never; alter user ‘root’@‘localhost’ identified with mysql_native_password by ‘123456’; # 更新用户的密码 flush privileges; # 刷新权限

转载请注明原文地址: https://www.6miu.com/read-5035041.html

最新回复(0)