Home >Database >Mysql Tutorial >mysql自动断开连接的问题处理方案_MySQL

mysql自动断开连接的问题处理方案_MySQL

WBOY
WBOYOriginal
2016-06-01 13:40:441749browse

bitsCN.com
mysql与程序连接,在一定时间内没有出现连接超过mysql的连接等待时间(wait_timeout)会出现断开连接情况,跟数据库配置有关。 mysql默认连接等待时间是为(28800s)即8h, 可以通过 如图     mysql自动断开连接的问题处理方案_MySQL 命令:show global variables like 'wait_timeout'  查看等待时间 在msql5中wait_timeout的最大值分别是24d/365(win/linux); 在mysql中的安装目录中的my.ini增加一行   wait_timeout=1814400 linuix在etc/my.cnf中
  bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn