Home > Database > Mysql Tutorial > mysql修改wait

mysql修改wait

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:20:59
Original
1588 people have browsed it

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 mysql修改wait_timeout mysql mysql show global variables like 'wait_timeout'; 其默认值为8小时 mysql的一个connection空闲时间超过8小时,mysql会自动断开该连接。 1.修改配置 vi /etc/my.cnf [m

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入

  mysql修改wait_timeout

  mysql  mysql> show global variables like 'wait_timeout';

  其默认值为8小时

  mysql的一个connection空闲时间超过8小时,mysql会自动断开该连接。

  1.修改配置

  vi /etc/my.cnf

  [mysqld]  wait_timeout=10

  # /etc/init.d/mysql restart

  2.直接用sql命令行修改  mysql> set global wait_timeout=10;

  mysql> show global variables like 'wait_timeout';

  +----------------------------+-------+  | Variable_name

  | Value |  +----------------------------+-------+  | wait_timeout

  | 10    |  +----------------------------+-------+

  show variables like '%time%';

  timeBetweenEvictionRunsMillis = 20000  #dbcp每2000秒进行一次connection的检  minEvictableIdleTimeMillis = 28700  #每次检验中将超过28700秒处于空闲的connection断开

mysql修改wait

Related labels:
Statement of this Website
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template