mysql的连接一直很2B,以前是过段时间会中断连接。
现在是一启动就报错。
主要的解决办法就是在连接池(我用的是Druid)上下功夫。
在连接时,它会有一个检测的配置:
大致如下:
testValiation=select 1
testOnBorrow=true
refurl:http://nkcoder.github.io/blog/20140712/mysql-reconnect-packet-lost/
mysql的连接一直很2B,以前是过段时间会中断连接。
现在是一启动就报错。
主要的解决办法就是在连接池(我用的是Druid)上下功夫。
在连接时,它会有一个检测的配置:
大致如下:
testValiation=select 1
testOnBorrow=true
refurl:http://nkcoder.github.io/blog/20140712/mysql-reconnect-packet-lost/