jdbc 连接Mysql Communications link failure due to underlying exception: 非常纳闷,急求高手解决办法 15
错误信息:com.mysql.jdbc.CommunicationsException:Communicationslinkfailureduetounderlyinge...
错误信息:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
STACKTRACE:
java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1895)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:496)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:997)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1699)
at com.mysql.jdbc.Connection.<init>(Connection.java:408)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:270)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:221)
at com.mingrisoft.DBConnection.getConnToMySql(DBConnection.java:63)
at com.mingrisoft.DBConnection.getConn(DBConnection.java:33)
at com.mingrisoft.Login.LoginCheck(Login.java:19)
at org.apache.jsp.admin.login_jsp._jspService(login_jsp.java:125)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at
连接信息:MySQLURL=jdbc:mysql://127.0.0.1:3306/webdb
MySQLName=root
MySQLPassword=password
===================已经试过的方法================
1、mysql数据库 等待时间调大
wait_timeout=31536000
interactive_timeout=31536000
2、重装mysql
3、驱动包版本没问题,已经换过多个版本
4、客户端和cmd都可以连接 展开
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
STACKTRACE:
java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1895)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:496)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:997)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1699)
at com.mysql.jdbc.Connection.<init>(Connection.java:408)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:270)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:221)
at com.mingrisoft.DBConnection.getConnToMySql(DBConnection.java:63)
at com.mingrisoft.DBConnection.getConn(DBConnection.java:33)
at com.mingrisoft.Login.LoginCheck(Login.java:19)
at org.apache.jsp.admin.login_jsp._jspService(login_jsp.java:125)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at
连接信息:MySQLURL=jdbc:mysql://127.0.0.1:3306/webdb
MySQLName=root
MySQLPassword=password
===================已经试过的方法================
1、mysql数据库 等待时间调大
wait_timeout=31536000
interactive_timeout=31536000
2、重装mysql
3、驱动包版本没问题,已经换过多个版本
4、客户端和cmd都可以连接 展开
2个回答
2018-07-30
展开全部
如果你包都加对了的话,,,,你配置怎么写的?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询