Navicat、HeidiSQL连接MySQL8缺少caching_sha2_password认证模块

造成该问题的原因是,MySQL7之前的加密方式是mysql_native_password,MySQL7之后加密方式是caching_sha2_password,如下为MySQL8加密方式示例

mysql> use mysql;

mysql> select user,host,plugin from user;
+------------------+-----------+-----------------------+
| user             | host      | plugin                |
+------------------+-----------+-----------------------+
| lizhencheng      | %         | caching_sha2_password |
+------------------+-----------+-----------------------+

解决该问题,只需改变加密方式即可

ALTER USER 'lizhencheng'@'%' IDENTIFIED WITH mysql_native_password BY '新密码';

你可能感兴趣的:(MySQL,mysql)