安装Mysql8后,mysql workbench连接数据库报错:Authentication plugin 'caching_sha2_password' cannot be loaded

安装Mysql8后,mysql workbench连接数据库报错:
在这里插入图片描述
这是因为 : 8.0加密方式是(caching_sha2_password)有些 mysql workbench 客户端还不支持. 因此需要修改 mysql 用户密码的加密方式.

查看加密方式:

 select user, host, plugin, authentication_string from user\G;

修改密码加密方式:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED with mysql_native_password BY 'password' PASSWORD EXPIRE NEVER;

注意 : BY ‘password’ password指的是你自己的密码!

你可能感兴趣的:(Mysql)