Description
The read_only variable specifies whether a tenant is in read-only mode.
Required privileges
Query variables
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or view theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to query the value of a global system variable.Modify variables
systenantThe
systenant can directly modify the value of a global system variable.MySQL user tenant
A MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.V4.x
For Oracle user tenants, the
ALTER SYSTEMprivilege is required to modify the value of a global system variable, starting from V4.2.0.
Attributes
| Attribute | Description |
|---|---|
| Type | bool |
| Default value | 0 |
| Value range | |
| Scope | GLOBAL |
Note
After you set this variable, it affects all ordinary users in the tenant but does not affect the root user.