mysql修改wait_timeout
mysql mysql> show global variables like wait_timeout;
其默认值为小时
mysql的一个connection空闲时间超过小时mysql会自动断开该连接
修改配置
vi /etc/f
[mysqld] wait_timeout=
# /etc/initd/mysql restart
直接用sql命令行修改 mysql> set global wait_timeout=;
mysql> show global variables like wait_timeout;
+++ | Variable_name
| Value | +++ | wait_timeout
| | +++
show variables like %time%;
timeBetweenEvictionRunsMillis = #dbcp每秒进行一次connection的检 minEvictableIdleTimeMillis = #每次检验中将超过秒处于空闲的connection断开