Note
This variable is available starting with V2.2.77.
Description
The max_connections variable specifies the maximum number of connections allowed for the entire tenant.
Note
This variable is effective only in MySQL mode.
Privilege requirements
Query a variable
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or view theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to query the value of a global system variable.Modify a variable
The
systenant can directly modify the value of a global system variable.A MySQL user tenant needs the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Uint
NoteThis variable was introduced in V4.0.0. The type was changed from Int to Uint. |
| Default value | 2147483647
NoteThis variable was introduced in V4.0.0. The default value was changed from 151 to 2147483647. |
| Value range | [1,2147483647]
NoteThis variable was introduced in V4.0.0. The value range was changed from [1, 100000] to [1, 2147483647]. |
| Effective scope | Global
NoteThis variable was introduced in V4.0.0. The effective scope was changed from GLOBAL and SESSION to GLOBAL. |
| Modifiable | Yes. You can modify the value by using the SET statement. |
Examples
Set the maximum number of connections for the entire tenant to 2147483647.
obclient> SET GLOBAL max_connections=2147483647;