DBeaver连接mysql失败:Unable to load authentication plugin 'caching_sha2_password'.

DBeaver连接mysql失败:Unable to load authentication plugin 'caching_sha2_password'.
通过百度翻译把错误提示翻译一下
DBeaver连接mysql失败:Unable to load authentication plugin 'caching_sha2_password'.
这个是因为,mysql8之前的版本使用的密码加密规则是mysql_native_password,但是在mysql8则是caching_sha2_password,所以需要修改密码加密规则。
接下来要做的事情就是修改mysql使用的密码加密规则。
使用WIN+R打开cmd对话框
输入mysql -u’用户名(默认root)’ -p’密码’,进入数据库
DBeaver连接mysql失败:Unable to load authentication plugin 'caching_sha2_password'.
使用 use mysql打开数据库 和 select user,host,plugin from user; 查看用户,主机,插件

DBeaver连接mysql失败:Unable to load authentication plugin 'caching_sha2_password'.
接下来开始修改默认插件alter user 'root' @'localhost' identified with mysql_native_password by 'root'; by后面输入密码,可以通过该语句修改密码,若不需要修改密码则输入原来的密码
DBeaver连接mysql失败:Unable to load authentication plugin 'caching_sha2_password'.
再次输入 select user,host,plugin from user; 查看用户,主机,插件
DBeaver连接mysql失败:Unable to load authentication plugin 'caching_sha2_password'.
到这里就可以正常连接mysql了
DBeaver连接mysql失败:Unable to load authentication plugin 'caching_sha2_password'.