admin管理员组

文章数量:1618711

IDEA连接远程数据库报 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.
问题描述: idea插件dataBase 远程连接数据库失败 并且报错显示为:

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.

图片如下:

我造成这个问题的原因是 我用服务器上的docker 创建的MySQL 做了端口映射的 暴露在外部的端口是不是mysql的3306端口,但是很尴尬的是我忘记了这件事了,因此 就拿3306去连接就报错了,所以如果出现上述报错可能是端口号不对,首先 查看 mysql是否设置远程访问,其次查看端口是否暴露出来,也就是服务器上的端口是否运行远程访问等一些细节问题
总结: 我遇到的就是几个月没用自己远程的数据库忘记了之前的一些部署了所以造成了这个问题,希望我遇到的这个问题能够与你们的遇到的问题提供一些思路

本文标签: 数据库LINKCommunicationsIDEAfailure