惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - 林石

[转].NET Core、Xamarin、.NET Standard和.NET Framework四者之间的区别 .NET工行E生活接入AES加密算法的吐槽-2018 [转]MYSQL性能查看(命中率,慢查询) 可遇不可求的Question之MySql4.0前版本不支持union与批量SQL提交 Cookie的几点忠告 可遇不可求的Question之MySqlClient的Guid 类型的映射篇 可遇不可求的Question之SQLSERVER触发器不支持多行插入操作篇 可遇不可求的Question之Sqlserver2005文件组的迁移篇 可遇不可求的Question之INSERT … ON DUPLICATE KEY UPDATE 语法篇 可遇不可求的Question之Mysql在不重启服务的情况下修改运行时变量篇 可遇不可求的Question之flash的socket连接安全策略文件篇 可遇不可求的Question之error: Failed dependencies: MySQLconflicts 错误篇 可遇不可求的Question之导入mysql中文乱码解决方法篇 Codesmith怎么判断sqlserver数据库字段是不是标识自增字段 可遇不可求的Question之skip-name-resolve模式篇 MySQL Error Codes MYSQL的错误代码 [转]如何成为强大的程序员? 可遇不可求的Question之Silverlight完美加密工具deepsea篇 可遇不可求的Question之反序列化时出现“base-64 字符数组的无效长度”错误提示篇
可遇不可求的Question之MySQL系统变量interactive_timeout 与 wait_timeout 篇
林石 · 2017-03-09 · via 博客园 - 林石

mysql>show variables like '%timeout';

打印结果如下:

+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| connect_timeout | 5 |
| delayed_insert_timeout | 300 |
| interactive_timeout | 28800 |
| net_read_timeout | 30 |
| net_write_timeout | 60 |
| slave_net_timeout | 3600 |
| wait_timeout | 28800 |
+----------------------------+-------+

interactive_timeout 需在mysql_connect()设置CLIENT_INTERACTIVE选项后起作用,并被赋值为wait_timeout;

mysql>set wait_timeout = 10; 对当前交互链接有效;
mysql>set interactive_timeout = 10; 对后续起的交互链接有效;

该超时时间单位是秒,从变量从上次SQL执行后算起;当前空闲若超过该时间,则也会被强制断开。