Note
This variable is available starting with V1.4.
Description
character_set_connection specifies the character set to be used for converting received statements.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can query the value of Global system variables by using theSHOW VARIABLESstatement or theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle-compatible mode) and theinformation_schema.GLOBAL_VARIABLESview (MySQL-compatible mode).Session level
The
systenant and all user tenants can query the value of Session system variables by using theSHOW VARIABLESstatement or theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle-compatible mode) and theinformation_schema.SESSION_VARIABLESview (MySQL-compatible mode).
Modify variables
Global level
The
systenant can directly modify the value of Global system variables.MySQL user tenants need to have the
SUPERorALTER SYSTEMprivilege to modify the value of Global system variables.Oracle user tenants need to 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 | String |
| Default value | utf8mb4 |
| Value range |
|
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
| Nullable | Yes |
Examples
Set the character set to be used for converting received statements to utf8mb4.
Global level
obclient> SET GLOBAL character_set_connection ='utf8mb4';Session level
obclient> SET character_set_connection ='utf8mb4';