[mysqld]
interactive_timeout=20

 交互式连接

会话1

[root@localhost ~]# mysql -umysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.28-debug-log Source distribution Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

会话2

mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 8 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 9 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 9 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 10 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 10 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 11 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.01 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 12 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 12 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 13 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 14 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 14 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.01 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 15 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 16 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 16 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 17 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 18 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 18 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 19 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
| 10 | mysql | localhost | NULL | Sleep | 20 | | NULL |
+----+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec) mysql> show full processlist;
+----+------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+------+---------+------+-------+-----------------------+
| 8 | root | localhost | NULL | Query | 0 | init | show full processlist |
+----+------+-----------+------+---------+------+-------+-----------------------+
1 row in set (0.00 sec) 20秒钟后,会话1,退去

interactive_timeout的更多相关文章

  1. MySQL中interactive_timeout和wait_timeout的区别

    在用mysql客户端对数据库进行操作时,打开终端窗口,如果一段时间没有操作,再次操作时,常常会报如下错误: ERROR (HY000): Lost connection to MySQL server ...

  2. MySQL : interactive_timeout v/s wait_timeout

    Most of the database intensive applications are worring about the default values of these variables ...

  3. MySQL中的配置参数interactive_timeout和wait_timeout(可能导致过多sleep进程的两个参数)

    1)interactive_timeout:参数含义:服务器关闭交互式连接前等待活动的秒数.交互式客户端定义为在mysql_real_connect()中使用CLIENT_INTERACTIVE选项的 ...

  4. 设置mysql的interactive_timeout和wait_timeout的值

    1,为什么要重新设置这两个变量的值? 因为如果数据库默认这两个变量的值是8小时(即28800秒)如果在8小时之内没有连接到数据库,等下次再连的时候就会抛连接超时,或连接关闭这样的异 常,但是多连接几次 ...

  5. interactive_timeout和wait_timeout(

    mysql> show variables like "%timeout%"; +-----------------------------+----------+ | Va ...

  6. mysql wait_timeout和interactive_timeout总结

      (1)interactive_timeout:参数含义:服务器关闭交互式连接前等待活动的秒数.交互式客户端定义为在mysql_real_connect()中使用CLIENT_INTERACTIVE ...

  7. MySQL:参数wait_timeout和interactive_timeout以及空闲超时的实现【转】

    一.参数意思 这里简单解释一下两个参数,含义如下: interactive_timeout:The number of seconds the server waits for activity on ...

  8. MySQL中interactive_timeout和wait_timeout的区别【转】

    在用mysql客户端对数据库进行操作时,打开终端窗口,如果一段时间没有操作,再次操作时,常常会报如下错误: ERROR 2013 (HY000): Lost connection to MySQL s ...

  9. 可遇不可求的Question之MySQL系统变量interactive_timeout 与 wait_timeout 篇

    mysql>show variables like '%timeout'; 打印结果如下: +----------------------------+-------+ | Variable_n ...

随机推荐

  1. Scrum 体验活动笔记

    2014-03-10  Isoftstone library 1.识别角色(用户),形象 :名称.痛处.属性.需求 2.编写故事 story以验证需求是否正确:我们假设(客户)  进行验证结果... ...

  2. 关于设置sqlplus提示符样式的方法

    摘要:大家在日常工作中,我想99%都会用到sqlplus工具来登陆你的数据库,对数据库进行管理.调优.配置.运维.那么如果有n多台数据库的时候,我们在连接后全部是统一的SQL>提示符,就有可能发 ...

  3. 剑指Offer:第一个只出现一次的字符

    题目:在字符串中找出第一个只出现一次的字符.如输入"abaccdeff",这输出'b' // 第一个只出现一次的字符 #include <stdio.h> char f ...

  4. Java中调用参数是数组的存储过程

    Java中调用参数是数组的存储过程 1. 存储过程以及类型定义如下: --The array in oracle CREATE OR REPLACE TYPE idArray AS TABLE OF ...

  5. (转载)HTML与XHTML有什么区别

    转自:http://zhidao.baidu.com/link?url=8wvu7Jbzr-wjeKdWCwWkIiJNSpO3HHLERkgQu1QzuLOPT0zvzkHn9HbAFEjPdchP ...

  6. uva11992-Fast Matrix Operations(区间增值、改值)

    题意: r行c列的全0矩阵   有三种操作 1 x1 y1 x2 y2 v子矩阵(x1,y1,x2,y2)所有元素增加v 2 x1 y1 x2 y2 v子矩阵(x1,y1,x2,y2)所有元素设为v ...

  7. HDU 5638 Toposort 线段树+贪心

    题意:bc round 74 分析: 参考下普通的用堆维护求字典序最小拓扑序, 用某种数据结构维护入度小于等于k的所有点, 每次找出编号最小的, 并相应的减少k即可. 这个数据结构可以用线段树, 建立 ...

  8. C#编写 "Hello,Word!" 您的第一个程序。

    教程 下面的示例展示编写C#“Hello World”程序的几种不同的方法. 示例 1 //Hello1.cs public class Hello1 { public static void Mai ...

  9. STM32 USB-HID通信移植步骤

    大家可以使用压缩包中的UsbApp.exe调试本软件idVendor为:0483  idProduct为5750. 今天太晚了,明天还要上半天班,上位机软件找个时间在写一篇文章.请关注我的博客.压缩包 ...

  10. 安装zabbix server

    本文安装的zabbix版本为2.2 步骤 1.安装php 5.3.3 rpm -e `rpm -qa | grep php` rpm -ivh http://mirrors.163.com/cento ...