[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. C语言块内变量回收问题

    之前有一个错误认识,错误的认为局部变量的回收是发生在函数返回时.其实在块结束时块内使用的内容就会被回收了. 以下的实例说明了问题 ]; ; i < ; ++i) { int item = i; ...

  2. 如何将域中的AD数据导入SharePoint

    转:http://www.cnblogs.com/wallis0922/archive/2010/09/29/1838292.html 最近刚装好sharepoint2010,想要研究一下,第一件想做 ...

  3. SharePoint 2010 master page 控件介绍(5):其他

    转:http://blog.csdn.net/lgm97/article/details/6409227 <!-- 处理搜索按下"enter"键和点击后退按钮 --> ...

  4. unix network programming(3rd)Vol.1 [第2~5章]《读书笔记系列》

    13~22章 重要 第2章 传输层: TCP/ UDP / STCP (Stream Control Transmission Protocol) TCP 可靠,有重传机制,SYN队列号 UDP 不可 ...

  5. MySQL 视图知识点小结

    视图本身是一个虚拟表,不存放任何数据.在使用SQL语句访问视图的时候,它返回的数据是MySQL从其他表中生成的.视图和表在同一个命名空间, MySQL在很多地方对于视图和表是同样对待的.不过视图和表也 ...

  6. Tomcat安全

    一.版本安全 升级当前的tomcat版本为最新稳定版本.故名思议,最新稳定版本就要兼顾最新和稳定这两个概念.一个稳定的版本,是需要时间沉淀的,而最新又是相对于稳定版而言的最新.因此我们一般会选择当前大 ...

  7. VirtualBox故障一例

    早上的测试环境,估计是任务太重了吧,在点击VirtualBox的快速休眠后,就没有响应了,查看日志,内容都是: aComponent={Console} aText={The virtual mach ...

  8. C/C++:原码、反码和补码

    正数的原码.反码和补码是一模一样的.   负数的反码的符号位跟原码一样,但其余各位取反. 负数的补码是其反码的最末位加1得到,即原码取反加1.   补码的补码就是原码.   浮点数的存储格式随着机器的 ...

  9. Magento输入正确的登陆名和密码无法进入后台

    请找到 这个文件夹: app\code\core\Mage\Core\Model\Session\Abstract 然后修改Varien.php这个文件: 找到代码(大约88行): $cookiePa ...

  10. 4.1Reduction模型

    1. Reduction Reduction是一种广泛使用的计算模型,特别是在并行计算领域.简单地来说,Reduction就是一系列的划分(Partition)和汇总(Summarize)操作的集合: ...