idea自带database连接mysql失败问题

在IDEA中尝试连接MySQL数据库时遇到Communicationslinkfailure错误,问题与SSL协议有关。解决方案包括在URL中添加useSSL=false参数,或在驱动的高级设置中禁用SSL。应用这些修改后成功解决了连接问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

idea2023.1版连接mysql失败

DBMS: MySQL (ver. 5.7.13)
Case sensitivity: plain=exact, delimited=exact
Driver: MySQL Connector Java (ver. mysql-connector-java-5.1.47 ( Revision: fe1903b1ecb4a96a917f7ed3190d80c049b1de29 ), JDBC4.0)
[08S01]
	Communications link failure

	The last packet successfully received from the server was 95 milliseconds ago.  The last packet sent successfully to the server was 89 milliseconds ago.
No appropriate protocol (protocol is disabled or cipher suites are inappropriate).

使用如下:
在这里插入图片描述
填写正确的IP,端口,账号,密码
test connection 报如下错误

DBMS: MySQL (ver. 5.7.13)
Case sensitivity: plain=exact, delimited=exact
Driver: MySQL Connector Java (ver. mysql-connector-java-5.1.47 ( Revision: fe1903b1ecb4a96a917f7ed3190d80c049b1de29 ), JDBC4.0)
[08S01]
Communications link failure

The last packet successfully received from the server was 95 milliseconds ago.  The last packet sent successfully to the server was 89 milliseconds ago.

No appropriate protocol (protocol is disabled or cipher suites are inappropriate).

解决方案:
1.url路径中 加入 useSSL=no或者useSSL=false在这里插入图片描述
2.在advanced中下拉选中useSSl为no

3.驱动中的advanced中的useSSL设置为非true
在这里插入图片描述

完美解决

评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值