wait_timeout
Mysql活动链接的时间限制,当进行长连接时,该值应该尽可能的大
The number of seconds the server waits for activity on a noninteractive connection before closing it. This timeout applies only to TCP/IP and Unix socket file connections, not to connections made via named pipes, or shared memory.
| Command-Line Format | --wait_timeout=# | |
| Config-File Format | wait_timeout | |
| Option Sets Variable | Yes, wait_timeout | |
| Variable Name | wait_timeout | |
| Variable Scope | Both | |
| Dynamic Variable | Yes | |
| Permitted Values | ||
| Type | numeric | |
| Default | 28800 | |
| Range | 1-31536000 | |
| Permitted Values | ||
| Type (windows) | numeric | |
| Default | 28800 | |
| Range | 1-2147483 | |
interactive_timeout
The number of seconds the server waits for activity on an interactive connection before closing it. An interactive client is defined as a client that uses the CLIENT_INTERACTIVE option to mysql_real_connect(). See also wait_timeout.
| Command-Line Format | --interactive_timeout=# | |
| Config-File Format | interactive_timeout | |
| Option Sets Variable | Yes, interactive_timeout | |
| Variable Name | interactive_timeout | |
| Variable Scope | Both | |
| Dynamic Variable | Yes | |
| Permitted Values | ||
| Type | numeric | |
| Default | 28800 | |
| Min Value | 1 | |
本文介绍了MySQL中wait_timeout和interactive_timeout参数的作用,这两个参数分别用于设置非交互式和交互式连接的空闲超时时间。文章详细解释了它们的默认值、可设置范围及如何通过命令行或配置文件进行调整。
3910

被折叠的 条评论
为什么被折叠?



