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
The
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
The
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
The
systenant can directly modify the value of global system variables.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of global system variables.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the value of global system variables.
Session level
The
systenant and all user tenants can directly modify the value of session system variables.
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. |
Usage
At session startup, 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 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 that the server waits for activity before closing an interactive connection to 28800.
Global level
obclient> SET GLOBAL interactive_timeout =28800;Session level
obclient> SET interactive_timeout =28800;