tomcat链接mysql时超时报错java.io.EOFException: Can not read response from server. Expected to read 4 bytes,

需要在配置文件里加上下面就ok了

<property name=”minEvictableIdleTimeMillis” value=”1800000″ />
<property name=”numTestsPerEvictionRun” value=”3″ />
<property name=”testOnBorrow” value=”true” />
<property name=”testWhileIdle” value=”true” />
<property name=”testOnReturn” value=”true” />
<property name=”validationQuery” value=”SELECT 1″ />

posted on 2018-06-04 11:43  范兵  阅读(1197)  评论(0编辑  收藏  举报

导航