[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. Microsoft强大团队(源代码)管理工具--TFS2010 与vs结合

    今天看了与vs 集成原理工具 TFS 2010, 角色分配.项目管理.开发源代码管理.任务分配管理.测试文档管理及跟踪等管理流程.代码版本的分支与合并等等,功能好强大啊. 以下将其安装配置简要介绍(以 ...

  2. RPi 2B apache2 mysql php5 and vsftp

    /************************************************************************* * RPi 2B apache2 mysql ph ...

  3. andori 动画验证必填项

    android项目开发过程中,都会碰到必填项的校验,最简单的就是利用Toast对用进行提示,感觉这种提示太不够人性化了,那么今天就来个带动画的,并可以将光标定位到必填项中. andorid动画Anim ...

  4. SharePoint 2007 页面定制(一)

    转:http://www.nanmu.net/SharePoint-MOSS-WSS-Silverlight/Lists/Posts/Post.aspx?ID=74 本文主要包括以下几方面内容: 1. ...

  5. centos vpn client set

    http://my.oschina.net/fishman/blog/96227 先检查服务器是否安装过 ppp, pptp, pptp-setup, 如果没有, yum -y install  安装 ...

  6. [原创]使用squish打包与混淆cocos2d-x的lua脚本

    squish是一个开源的用于打包lua脚本的小工具,它的主要功能是将多个lua文件整合成一个文件,并在此基础上做压缩和混淆等处理,混淆和压缩后的代码可以直接被执行而不需要先做解压还原等操作. 它的gi ...

  7. 【原】Storm调度器

    Storm入门教程 1. Storm基础 Storm Storm主要特点 Storm基本概念 Storm调度器 Pluggable scheduler(可插拔调度器) Isolation schedu ...

  8. LeetCode题解——ZigZag Conversion

    题目: 把一个字符串按照Z型排列后打印出来,例如 "PAYPALISHIRING" 重新排列后为3行,即 P A H N A P L S I I G Y I R 那么输出为&quo ...

  9. MFC消息映射机制

    1.MFC应用框架主要类之间的关系 MFC自动生成的框架中重要的类有:C-App.CMainFrame.C-Doc和C-View. 其他的类如CClassView.CFileView等都是在框架窗口( ...

  10. HDU4614 Vases and Flowers

    http://acm.hdu.edu.cn/showproblem.php?pid=4614 HDU 4614 Vases and Flowers (2013多校第二场线段树) // #pragma ...