迁移工具:mysql测试连接失败

1.1、前置条件

目标库:V9.0.5.1

源库:MySQL

1.2、问题描述

Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

原因:MySQL Connector/J(JDBC 驱动)从5.1.38 之后、MySQL 8.x 全系,默认 useSSL=true,也就是客户端发起连接时,优先尝试 SSL 加密握手。

1.3、操作步骤

驱动属性添加:useSSL=false

[!NOTE]

不同 JDBC 驱动版本的 SSL 参数差异

1.4、预期结果

点击【测试连接】功能,提示:连接成功

1.5、异常处理

暂未发现相关异常场景

1.6、回滚方案

无需回滚

1.7、典型场景示例

用户使用MySQL Connector/J(JDBC 驱动)从5.1.38 之后、MySQL 8.x 全系