解决Mycat实现读写分离报错:can‘t connect to mysql server ,errmsg:client does not support authentication proto

问题1:配置文件中使用的用户密码的plugin不是native,需要修改;

 解决方法:

update mysql.user set host='%' where user='root';
update mysql.user set plugin='mysql_native_password' where user='root';
 select user,host,plugin from mysql.user;

效果:

问题2: 密码的认证有问题

 解决方法:

update mysql.user set authentication_string='*16F51094B9A153AECE86BCA3F7A237CB6FE5C183' where user='root';
flush privileges;
select user,host,plugin,authentication_string from mysql.user;

效果:

 最后stop 掉mycat ,重新start mycat就可以重新连接啦!!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Can't connect to MySQL server, errmsg.错误信息是指在连接MySQL服务器时出现的错误。根据引用和引用中的解决方法,可能的原因是MySQL用户的权限设置或者认证字符串不正确导致无法连接。可以尝试执行一些命令来解决这个问题。例如,通过更新MySQL用户的host和plugin字段的值,或者通过更新authentication_string字段的值来修复认证问题。可以使用命令"update mysql.user set host='%' where user='root';"和"update mysql.user set plugin='mysql_native_password' where user='root';"来更新用户的host和plugin字段的值。还可以使用命令"update mysql.user set authentication_string='*16F51094B9A153AECE86BCA3F7A237CB6FE5C183' where user='root';"来更新用户的authentication_string字段的值。然后使用命令"flush privileges;"来刷新权限。最后,可以使用命令"select user,host,plugin,authentication_string from mysql.user;"来检查用户的信息是否正确更新。希望这些方法可以帮助解决连接MySQL服务器时出现的错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [解决Mycat实现读写分离报错:can‘t connect to mysql server ,errmsg:client does not support ...](https://blog.csdn.net/weixin_63508484/article/details/130161063)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [MySQL报错:Can’t find file: ‘./mysql/plugin.frm’的解决方法](https://download.csdn.net/download/weixin_38733676/12826205)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值