MySQL错误:2059-authentication plugin 'caching_sha2_password'

165 阅读1分钟

在使用 navicate 对 mysql 数据库进行可视化管理时,报错,错误编号 2059:authentication plugin 'caching_sha2_password',如下图所示。

image.png

我 MySQL 版本为 mysql-14.14,navicate 使用的是 12.0.8 版本的。出现此错误的原因为 MySQL8.0 之前使用 mysql_native_password 方式进行加密,现在使用 caching_sha2_password 版本加密(对!就是报错的那个东西)。所以只需把 MySQL 的加密方式改回 mysql_native_password 就可以啦。

输入如下代码,更改加密方式,并设置密码为 123456。

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';