Plugin caching_sha2_password could not be loaded: The specifiedmodule could not be found.
MySQL新版默认使用caching_sha2_password作为身份验证插件,而旧版是使用mysql_native_password
当连接MySQL时报错“plugin caching_sha2_password could not be loaded”时,可换回旧版插件。
操作mysql数据库命令:
use mysql;
查看用户名使用的身份验证插件:
mysql> select Host,User,plugin from mysql.user;
mysql> select Host,User,plugin from mysql.user;
+-----------+------------------+-----------------------+
| Host | User | plugin |
+-----------+------------------+-----------------------+
| % | bg | caching_sha2_password |
| % | rot | mysql_native_password |
| localhost | deaint | caching_sha2_password |
| localhost | mema | caching_sha2_password |
| localhost | msion | caching_sha2_password |
| localhost | mys | caching_sha2_password |
+-----------+------------------+-----------------------+
6 rows in set (0.00 sec)
修改root用户的身份验证插件
本地连接:
alter user rootidentified with mysql_native_password by '123';
alter user root@localhost identified with mysql_native_password by '123';
FLUSH PRIVILEGES;
链接:https://blog.csdn.net/qq_54202620/article/details/122729704