interactive_timeout
[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的更多相关文章
- MySQL中interactive_timeout和wait_timeout的区别
在用mysql客户端对数据库进行操作时,打开终端窗口,如果一段时间没有操作,再次操作时,常常会报如下错误: ERROR (HY000): Lost connection to MySQL server ...
- MySQL : interactive_timeout v/s wait_timeout
Most of the database intensive applications are worring about the default values of these variables ...
- MySQL中的配置参数interactive_timeout和wait_timeout(可能导致过多sleep进程的两个参数)
1)interactive_timeout:参数含义:服务器关闭交互式连接前等待活动的秒数.交互式客户端定义为在mysql_real_connect()中使用CLIENT_INTERACTIVE选项的 ...
- 设置mysql的interactive_timeout和wait_timeout的值
1,为什么要重新设置这两个变量的值? 因为如果数据库默认这两个变量的值是8小时(即28800秒)如果在8小时之内没有连接到数据库,等下次再连的时候就会抛连接超时,或连接关闭这样的异 常,但是多连接几次 ...
- interactive_timeout和wait_timeout(
mysql> show variables like "%timeout%"; +-----------------------------+----------+ | Va ...
- mysql wait_timeout和interactive_timeout总结
(1)interactive_timeout:参数含义:服务器关闭交互式连接前等待活动的秒数.交互式客户端定义为在mysql_real_connect()中使用CLIENT_INTERACTIVE ...
- MySQL:参数wait_timeout和interactive_timeout以及空闲超时的实现【转】
一.参数意思 这里简单解释一下两个参数,含义如下: interactive_timeout:The number of seconds the server waits for activity on ...
- MySQL中interactive_timeout和wait_timeout的区别【转】
在用mysql客户端对数据库进行操作时,打开终端窗口,如果一段时间没有操作,再次操作时,常常会报如下错误: ERROR 2013 (HY000): Lost connection to MySQL s ...
- 可遇不可求的Question之MySQL系统变量interactive_timeout 与 wait_timeout 篇
mysql>show variables like '%timeout'; 打印结果如下: +----------------------------+-------+ | Variable_n ...
随机推荐
- Cobar分布式数据库的应用与实践
最新文章:看我如何快速学习.Net(高可用数据采集平台).高并发数据采集的架构应用(Redis的应用) 问题点: 随着项目的增长,数据和数据表也成倍的增长,普通的单点数据库已经无法满足日常的增长的需要 ...
- NET下RabbitMQ实践[配置篇]
这个系列目前计划写四篇,分别是配置,示例,WCF发布,实战.当然不排除加餐情况. 介绍: rabbitMQ是一个在AMQP协议标准基础上完整的,可服用的企业消息系统.他遵循Mozilla Publi ...
- MVC Action Filter
ASP.NET MVC Framework支持四种不同类型的Filter: Authorization filters – 实现IAuthorizationFilter接口的属性. Action fi ...
- 数列极限---和Gauss(取整)函数有关
- codeforces 401D (数位DP)
思路:很明显的数位dp,设dp[i][j] 表示选取数字的状态为i,模m等于j的数的个数,那么最后的答案就是dp[(1<<n)-1][0].状态转移方程就是,dp[i|(1<< ...
- Linux批量修改指定目录下的文件或文件夹权限
在Puppet下很头大,尤其是文件拷贝,使用file的mode会导致文件或文件夹都一个权限. 暂时使用命令代替: 最近忙着明年的N多计划,待有空后继续研究.
- ASP.NET_验证控件(class0620)
为什么使用验证控件 当需要让用户输入数据时,用户有可能输入不符合我们程序逻辑要求的信息,所以我们要对输入进行验证. 客户端验证(用户体验,减少服务器端压力) 服务器端验证(防止恶意攻击,客户端js很容 ...
- 【暑假】[深入动态规划]UVa 10618 Tango Tango Insurrection
UVa 10618 Tango Tango Insurrection 题目: Problem A: Tango Tango Insurrection You are attempting to lea ...
- mysql日期格式说明符
- 流(stream)
流的概念 Java程序通过流来完成输入/输出.流是生产或消费信息的抽象.流通过Java的输入/输出系统与物理设备链接.尽管与它们链接的物理设备不尽相同,所有流的行为具有同样的方式.这样,相同的输入/输 ...