MySQL Workbench 无法连接

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】: Release Version: v4.0.0-alpha-1315-gb85ae7d76-dirty Git Commit Hash: b85ae7d766d122c7bd8588529ad9353e948fe749 Git Branch: master UTC Build Time: 2020-01-06 02:17:11 GoVersion: go1.13 Race Enabled: false TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306 Check Table Before Drop: false
  • 【问题描述】:Navcat 和 Idea 都可以连上,MySQL Workbench 死活连不上,一直报 Access denied for user ‘root’@’****’ (using password: NO)。同样的 ip 端口和密码。。同机器上 3306 端口还跑了 MySQL,就没有问题,Navcat idea 和 MySQL Workbench 都可以连接。

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

  1. 将连接的 IP 的 TiDB Server 日志设置为 Debug 模式,通过 MySQL Workbench 连接 TiDB Server,确认 TiDB log debug 日志信息并返回。
  2. 反馈一下 Navicat、Idea、MySQL Workbench 的具体版本和发版日期。

[2020/01/20 15:35:24.426 +08:00] [ERROR] [session.go:1493] [“user connection verification failed”] [user=root@] [2020/01/20 15:35:28.309 +08:00] [ERROR] [session.go:1493] [“user connection verification failed”] [user=root@]

Navcat Premium for Mac 12.1.27 MySQL Workbench for Mac 8.0.19 Idea Ultimate 2019.2

麻烦提供以下信息,您提供的日志仅证明连接不上,需要结合 debug 的上下文,确认一下。日志要发全

好的 我试试

tidb.log

[2020/01/20 15:47:14.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 1, tp general"] [interval=1s]
[2020/01/20 15:47:14.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 2, tp add index"] [interval=1s]
[2020/01/20 15:47:14.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:14.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:15.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 2, tp add index"] [interval=1s]
[2020/01/20 15:47:15.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 1, tp general"] [interval=1s]
[2020/01/20 15:47:15.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:15.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:16.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 2, tp add index"] [interval=1s]
[2020/01/20 15:47:16.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 1, tp general"] [interval=1s]
[2020/01/20 15:47:16.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:16.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:17.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 1, tp general"] [interval=1s]
[2020/01/20 15:47:17.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 2, tp add index"] [interval=1s]
[2020/01/20 15:47:17.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:17.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:18.360 +08:00] [ERROR] [session.go:1493] ["user connection verification failed"] [user=root@125.118.*.*]
[2020/01/20 15:47:18.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 2, tp add index"] [interval=1s]
[2020/01/20 15:47:18.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 1, tp general"] [interval=1s]
[2020/01/20 15:47:18.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:18.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:19.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 1, tp general"] [interval=1s]
[2020/01/20 15:47:19.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 2, tp add index"] [interval=1s]
[2020/01/20 15:47:19.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:19.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:20.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 1, tp general"] [interval=1s]
[2020/01/20 15:47:20.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 2, tp add index"] [interval=1s]
[2020/01/20 15:47:20.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:20.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:21.154 +08:00] [ERROR] [session.go:1493] ["user connection verification failed"] [user=root@125.118.*.*]
[2020/01/20 15:47:21.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 1, tp general"] [interval=1s]
[2020/01/20 15:47:21.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 2, tp add index"] [interval=1s]
[2020/01/20 15:47:21.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:21.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:22.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 2, tp add index"] [interval=1s]
[2020/01/20 15:47:22.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 1, tp general"] [interval=1s]
[2020/01/20 15:47:22.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:22.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:23.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 2, tp add index"] [interval=1s]
[2020/01/20 15:47:23.834 +08:00] [DEBUG] [ddl_worker.go:134] ["[ddl] wait to check DDL status again"] [worker="worker 1, tp general"] [interval=1s]
[2020/01/20 15:47:23.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]
[2020/01/20 15:47:23.834 +08:00] [DEBUG] [ddl.go:313] ["[ddl] check whether is the DDL owner"] [isOwner=true] [selfID=48fc38a6-3cf8-48f5-aae7-d193d31f28fe]

看上去就是 user connection verification failed,但是我确认密码是没有问题的,直接复制进去的,MySQL Workbench 这边报错是:

Failed to Connect to MySQL at 121.41.*.*:4000 with user root
Access denied for user 'root'@'125.118.*.*' (using password: NO)

好像 Workbench 没有把我输入的密码传递过去

原因

Workbench for MAC 8.0.19 应该是支持的 MySQL 8.0 的客户端,而目前 TiDB 使用的客户端还是 MySQL 5.7 ,所以是不兼容导致的。

解决办法

Workbench 回退到 6.3 可以解决问题

好的,TiDB 有兼容 8.0 的计划吗?

已经在完善了,不过 client 目前还是兼容 MySQL 5.7 的。

好的,谢谢

:ok_hand: 如果有其他问题,麻烦创建新的 Asktug 问题贴

1 个赞

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。