本文主要是介绍MySQL错误com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
我在尝试与mysql建立连接的时候抛出以下异常。
MySQL错误com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
同时问题定位出错的地方在:
conn=DriverManager.getConnection(url, user, password);
这句话中,原本的定义为:
static final String url = "jdbc:mysql://localhost:3306/wx?useSSL=true";
static final String user = "root";
static final String password = "123456";
在url处修改,修改后为useSSL=false
具体原因还不清楚,但是作为一种解决方案提供给大家。
这篇关于MySQL错误com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!