首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

mysql闲空连接超过8个小时

2012-09-29 
mysql空闲连接超过8个小时项目中出现异常Communications link failureLast packet sent to the server was

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

热点排行