在mysql配置文件里添加wait_timeout和interactive_timeout两个值

[mysqld]

wait_timeout=315360000
interactive_timeout=315360000

超时时间,10年

重启mysql,

登入mysql 

 show variables like '%timeout%'; 

+-----------------------------+----------+

| Variable_name               | Value    |

+-----------------------------+----------+

| interactive_timeout         | 31536000 |

| wait_timeout                | 31536000 |

+-----------------------------+----------+

13 rows in set (0.00 sec)

看到值已经改变,设置成功

posted on 2016-11-29 10:16  小丑鱼2012  阅读(1679)  评论(0编辑  收藏  举报