Note
This variable is available starting with V1.4.
Description
interactive_timeout specifies the number of seconds the server waits for activity before closing an interactive connection.
Privilege requirements
Query variables
Global level
systenants and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle-compatible mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL-compatible mode) to obtain the value of a global system variable.Session level
systenants and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle-compatible mode) or theinformation_schema.SESSION_VARIABLESview (MySQL-compatible mode) to obtain the value of a session system variable.
Modify variables
Global level
systenants can directly modify the value of a global system variable.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
systenants and all user tenants can directly modify the value of a session system variable for their own tenant.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Int |
| Default value | 28800 |
| Value range | [1, 31536000] |
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Usage notes
At session startup, the session wait_timeout value is initialized to the value of the global wait_timeout or interactive_timeout variable, depending on the client type. The client type is determined by the CLIENT_INTERACTIVE option in the mysql_real_connect connection options. For more information about the wait_timeout variable, see wait_timeout.
Examples
Set the number of seconds 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;