com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 数据库报错
在重装系统后,重新下载JDK运行项目一直启动不起来报错
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
在网上查阅资料,并尝试了大多数人说的解决办法:
- 修改超时时间 ‘wait_timeout’
show global variables like 'wait_timeout';
show global variables like 'interactive_timeout';
set global wait_timeout=604800;
set global interactive_timeout=604800;
- 在尝试这种方法无效后第二种方法设置UseSSL=false成功解决了
思考: 在此之前我的数据库配置是一直没有变动过的,为什么就突然不行了呢
然后idea的数据库连接报错给了我灵感
搜索资料 删掉了 java.security 文件中的3DES_EDE_CBC成功解决。
不过看相关资料都是sqlserver数据库连接的时候会有此类问题,mysql的不多见
不知道3DES_EDE_CBC 是jdk哪个版本加上的
希望有大佬能给解释下
相关链接: https://blog.csdn.net/tanhongwei1994/article/details/84957254
http://www.manongjc.com/article/28484.html