MYSQL连接的问题 - Java / Java SE
Java code:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was51093 seconds ago.The last packet sent successfully to the server was 51093 seconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3246)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
at com.mysql.jdbc.StatementImpl.executeUpdate(
相关问答:
我在 java核心技术上 看了一个 利用 Java socket email的例子 可是怎么也 不成功 为什么?
源码
Java code:
package cn.com.test.email;
import java.awt.GridBagLayout;
import java.awt.event.Action ......
为什么HTML以及一些其它标签会显示一些特定表现形式呢?如HTML中的换行标签<BR/>在底层是怎样实现的呢?现实的原理是什么呢
去W3C官方网站上,看看吧!我想一看你就明白了
我猜和编译原理有关,浏览器里可 ......
在JSP页面有一个<input type="hidden" name="index" value="0">/>控件
当我用下面的JavaScript函数改变其value的值的时候 如果满足条件(即i>=3的时候)为什么value的 ......
使用java在windows7 32位下连接MSSQL。
两台机器,windows7 32位,在控制面板里面全部设置语言和区域选项都english-unitedstates
唯一区别只有在安装SQL server 2008的时候 选择的字符集不一样,
exec sp_helpsor ......