问题描述:使用 DataEase 连接数据库报错如下,这是由于用户 MySQL 开启了 SSL 连接认证。
Communications link failure The last packet sent successfully to the server was 0 miliseconds ago. The driver has not received any packets from the server.,
使用命令行连接报错如下。
SSL connection error: error:0A000102:SSL routines::unsupported protocol
处理方法
由于 MySQL 服务端开启了 SSL 连接,所以客户端需要对 SSL连接进行处理。
方法一
忽略 SSL 连接,在 DataEase 连接 MySQL 界面,额外的 JDBC 连接字符串上添加如下参数。
useSSL=false&sslMode=DISABLED
方法二
使用 SSL 连接,在 DataEase 连接 MySQL 界面,额外的 JDBC 连接字符串上添加如下参数,然后在 DataEase 服务器上传 ca 证书,连接即可。
useSSL=true&requireSSL=true&verifyServerCertificate=true&serverSslCert=/路径/ca.pem