mySql Linux 安装 mysql 8.0后;root用户在客户端连接不上

在Linux上安装MySQL 8.0后,遇到root用户使用mysql workbench和navcat无法连接的问题,错误提示为找不到caching_sha2_password插件。尝试升级mysql workbench至最新版无效。解决方法是通过服务器端修改用户密码加密方式为mysql_native_password,创建新用户验证成功。最后发现root用户在安装时可能指定了caching_sha2_password加密,通过命令行修改root用户密码插件完成连接。
摘要由CSDN通过智能技术生成

一、错误

  1. mysql workbench

Failed to Connect to MySQL at 10.211.55.6:3306 with user root
Authentication plugin ‘caching_sha2_password’ cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found

  1. navcat

连接失败

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

二、原因

密码加密方式【caching_sha2_password】,客户端不支持。

三、解决方法

在数据库服务器上登录:

use mysql;
select user, host, plugin, authentication_string from user\G;

*************************** 2. row **************************

user: root

host: %

plugin: caching_sha2_password

authentication_string: $A

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

征客

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值