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-compatible mode.
Privilege requirements
Query variables
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theinformation_schema.GLOBAL_VARIABLESview (MySQL-compatible mode) to view the value of a Global system variable.Modify variables
The
systenant can directly modify the value of a Global system variable.A MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a Global system variable.
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;