"Authentication plugin 'caching_sha2_password' cannot be loaded" error occurs when GUI tool connects to MySQL8

The problem is shown in the figure below:
insert image description here
the reason for this is that the encryption rules in versions before MySQL8 are mysql_native_password, but after MySQL8, the encryption rules are caching_sha2_password.

There are two ways to solve the problem:

The first is to upgrade the GUI tool version

The second is to restore the MySQL8 user login password encryption rules to mysql_native_password

The second method is recommended! ! !

The second solution is as follows:
After logging in to the MySQL database with the command line, execute the following command to modify the user password encryption rule and update the user password. Here, modify the user password rule of the user name "root@localhost" to "mysql_native_password", and the password value is "116129"

#使用mysql数据库
USE mysql;
#修改'root'@'localhost'用户的密码规则和密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '116129';
#刷新权限
FLUSH PRIVILEGES;

The specific operation is shown in the figure:
insert image description here
The result display:
insert image description here

Guess you like

Origin blog.csdn.net/weixin_43520450/article/details/124791047