Communications link failure

新装的centos7.9,mysql8.0.32,启动jar报错

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.

研究了半天,有说网络问题,有说jdbc驱动问题,有说错误的连接配置...

可是我之前装的centos,mysql版本都一样的就没有问题,新装的这个环境起不来,我怀疑是环境问题。

最后在mysql连接字符串上加上这个useSSL=false问题解决。

mysql_driver=com.mysql.cj.jdbc.Driver
mysql_constr=jdbc:mysql://127.0.0.1:3306/my_db?serverTimezone=GMT%2B8&useSSL=false
mysql_user=root
mysql_pwd=root
enable_pool=true

end>

posted @   xjournal  阅读(72)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
点击右上角即可分享
微信分享提示