Note
This variable is available starting with V1.4.
Description
interactive_timeout specifies the number of seconds that the server waits for activity before closing an interactive connection.
Privilege requirements
Query variables
Global level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the values of global system variables.Session level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to view the values of session system variables.
Modify variables
Global level
systenant can directly modify the values of global system variables.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the values of global system variables.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the values of global system variables.
Session level
systenant and all user tenants can directly modify the values of session system variables of their own tenants.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 28800 |
| Value range | [1, 31536000] |
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Considerations
When a session starts, the session wait_timeout is initialized based on the value of the global wait_timeout or the global interactive_timeout, depending on the client type. The client type is defined by the CLIENT_INTERACTIVE connection option of mysql_real_connect. For more information about the wait_timeout variable, see wait_timeout.
Examples
Set the number of seconds that the server waits for activity before closing an interactive connection to 28800.
Session level
obclient> SET interactive_timeout = 28800;Global level
obclient> SET GLOBAL interactive_timeout = 28800;