mysql8.0 连接 找不到指定模块caching_sha2_password.dll

首先查看数据库连接加密方式
mysql> use mysql
Database changed

mysql> select user,host,plugin from user;

+------------------+-----------+-----------------------+
| user             | host      | plugin                |
+------------------+-----------+-----------------------+
| root             | %         | caching_sha2_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session    | localhost | caching_sha2_password |
| mysql.sys        | localhost | caching_sha2_password |
| root             | localhost | caching_sha2_password |
+------------------+-----------+-----------------------+
plugin:连接加密方式
MySQL8.0加密方式为:caching_sha2_password
将需要连接的用户加密方式改为:mysql_native_password 即可,最后FLUSH权限。
//修改加密方式并指定密码
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '新密码';
Query OK, 0 rows affected (0.00 sec)

 //刷新权限
mysql> FLUSH PRIVILEGES;  
Query OK, 0 rows affected (0.00 sec)
这里我修改的是root并支持外部链接账号,可根据实际需求更改。
mysql> select user,host,plugin from user;
+------------------+-----------+-----------------------+
| user             | host      | plugin                |
+------------------+-----------+-----------------------+
| root             | %         | mysql_native_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session    | localhost | caching_sha2_password |
| mysql.sys        | localhost | caching_sha2_password |
| root             | localhost | caching_sha2_password |
+------------------+-----------+-----------------------+
5 rows in set (0.00 sec)

你可能感兴趣的:(mysql8.0 连接 找不到指定模块caching_sha2_password.dll)