Note
This variable is available starting with V2.2.77.
Description
max_connections specifies the maximum number of connections for a tenant.
Note
This variable applies only to OceanBase Database in MySQL mode.
Privilege requirements
Query variables
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the values of Global system variables.Modify variables
The
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.
Attributes
| Attribute | Description |
|---|---|
| Type | Uint
NoteStarting from V4.0.0, the type of this variable is changed from Int to Uint. |
| Default value | 2147483647
NoteStarting from V4.0.0, the default value of this variable is changed from 151 to 2147483647. |
| Value range | [1,2147483647]
NoteStarting from V4.0.0, the value range of this variable is changed from [1, 100000] to [1, 2147483647]. |
| Scope | Global
NoteStarting from V4.0.0, the scope of this variable is changed from GLOBAL and SESSION to GLOBAL. |
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Set the maximum number of connections for a tenant to 2147483647.
obclient> SET GLOBAL max_connections=2147483647;