[error] [mysql] 1251 - Client does not support authentication protocol requested by server

当使用navicat for mysql链接本地MySQL 8.0时,出现1251错误,提示客户端不支持服务器请求的认证协议。问题源于服务器的caching_sha2_password插件与客户端不兼容。解决方法是不升级客户端,而是将root用户的认证插件改为mysql_native_password,通过MySQL命令行修改root密码并指定新插件,从而能成功连接。
摘要由CSDN通过智能技术生成

[error] [mysql] 1251 - Client does not support authentication protocol requested by server

客户端使用navicat for mysql。本地安装了mysql 8.0。但是在链接的时候提示:

1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

主要原因是mysql服务器要求的认证插件版本与客户端不一致造成的。

打开mysql命令行输入如下命令查看,系统用户对应的认证插件:

select user, plugin from mysql.user;

img

可以看到root用户使用的plugin是caching_sha2_password,mysql官方网站有如下说明:

Important

The caching_sha2_password authentication plugin on the server requires new versions of connectors and clients, which add support for the new MySQL 8.0 default authentication.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值