相关推荐recommended
idea自带database连接mysql失败问题
作者:mmseoamin日期:2023-12-20

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).

使用如下:

idea自带database连接mysql失败问题,在这里插入图片描述,第1张

填写正确的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=falseidea自带database连接mysql失败问题,在这里插入图片描述,第2张

2.在advanced中下拉选中useSSl为no

idea自带database连接mysql失败问题,第3张

3.驱动中的advanced中的useSSL设置为非true

idea自带database连接mysql失败问题,在这里插入图片描述,第4张

完美解决