client does not support authentication protocol requested by server;

Posted Young

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了client does not support authentication protocol requested by server;相关的知识,希望对你有一定的参考价值。

原因查找
通过查看网上别人遇到的相关问题,发现是由于navicat版本的问题,出现连接失败的原因:mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password。并提供了两种解决方案:

  • 升级navicat,由于navicat是收费的,个人感觉升级会比较麻烦点。
  • 把用户密码登录的加密规则还原成mysql_native_password这种加密方式,这里选择第二种解决方案。
docker exec -it mysql bash  #进入登录mysql

ALTER USER \'root\'@\'localhost\' IDENTIFIED BY \'password\' PASSWORD EXPIRE NEVER;  #这里的password是你正在使用的密码

ALTER USER \'root\'@\'localhost\' IDENTIFIED WITH mysql_native_password BY \'password\';  #更新一下用户的密码这里的password为新的密码

FLUSH PRIVILEGES; 

以上是关于client does not support authentication protocol requested by server;的主要内容,如果未能解决你的问题,请参考以下文章

client does not support authentication

mysql服务设置远程连接 解决1251 client does not support ..问题

client does not support authentication

docker mysql Client does not support

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by serv

ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol ...以及如何打开MySQL终端。