mysql空闲连接超过8个小时
项目中出现异常
Communications link failure
Last packet sent to the server was 0 ms ago.
原因:
mysql空闲连接超过8个小时自动关闭!
解决办法:
编辑/etc/my.cnf(windows下为my.ini),将超时时间设置为10年,在[mysqld]后面加入:
wait_timeout=315360000
发布时间: 2012-09-29 10:30:01 作者: rapoo
mysql空闲连接超过8个小时
项目中出现异常
Communications link failure
Last packet sent to the server was 0 ms ago.
原因:
mysql空闲连接超过8个小时自动关闭!
解决办法:
编辑/etc/my.cnf(windows下为my.ini),将超时时间设置为10年,在[mysqld]后面加入:
wait_timeout=315360000