Overview
interactive_timeout specifies the number of seconds the server waits for activity before closing an interactive connection.
Privilege requirements
Query variables
Global level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Session level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.SESSION_VARIABLESview to view the values of session system variables.
Modify variables
Global effective
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session expiration
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Int |
| Default Value | 28800 |
| Value range | [1, 31536000] |
| Effective Scope |
|
| Modifiable | Yes, you can use theSETStatement modification. |
Usage instructions
When a session is started, its wait_timeout value is initialized based on either the global wait_timeout or the global interactive_timeout value. Which value is used depends on the client type. The client type is defined by the CLIENT_INTERACTIVE connection option in mysql_real_connect. For more information about the wait_timeout variable, see wait_timeout.
Configuration example
Set the number of seconds to wait for active connections before closing interactive connections on the server to 28800.
Session Validity Period
obclient> SET interactive_timeout = 28800;Effective globally
obclient> SET GLOBAL interactive_timeout = 28800;