Overview
auto_increment_increment is used to set the auto-increment step size, and is applicable only when logging in through the MySQL client.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Session level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.SESSION_VARIABLESview to view the values of session system variables.
Modify variables
Global effective
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session expiration
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Uint |
| Default Value | 1 |
| Value range | [1, 65535] |
| Effective Scope |
|
| Modifiable | Yes, you can use theSETStatement modification. |
Configuration example
Set the increment step of the auto-increment column to 1.
Effective globally
obclient> SET GLOBAL auto_increment_increment =1;Session expiration
obclient> SET auto_increment_increment =1;