Note
This variable was introduced in V1.4.
Description
The interactive_timeout variable specifies the number of seconds the server waits for activity on an interactive connection before closing it.
Privilege requirements
Query variables
- Global level
sys tenants and all user tenants can execute the SHOW VARIABLES statement or view SYS.TENANT_VIRTUAL_GLOBAL_VARIABLE (in Oracle mode) or information_schema.GLOBAL_VARIABLES (in MySQL mode) to query the value of a global system variable.
* Session level
sys tenants and all user tenants can execute the SHOW VARIABLES statement or view SYS.TENANT_VIRTUAL_SESSION_VARIABLE (in Oracle mode) or information_schema.SESSION_VARIABLES (in MySQL mode) to query the value of a session system variable.
Modify variables
Set the variable at the global level
systenants can directly modify the value of a global system variable.MySQL user tenants need the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
For V4.x, Oracle user tenants need the
ALTER SYSTEMprivilege to modify the value of a global system variable starting from V4.2.0.- Set the variable at the session level
sys tenants and all user tenants can directly modify the value of a session system variable in their own tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | int |
| Default value | 28800 |
| Value range | [1, 31536000] |
| Effective scope |
| Modifiable | Yes. The value can be modified by using the SET statement.|
Considerations
At the start of a session, the value of the session wait_timeout variable is initialized based on the value of the global wait_timeout variable or the global interactive_timeout variable, depending on the client type. The client type is defined by the CLIENT_INTERACTIVE option of the mysql_real_connect function. For more information about the wait_timeout variable, see wait_timeout.
Examples
Set the variable at the session level
obclient> SET interactive_timeout = 28800;Set the variable at the global level
obclient> SET GLOBAL interactive_timeout = 28800;
