Note
This variable is available starting with V2.2.77.
Description
validate_password_check_user_name specifies whether the user password can be the same as the username.
Privilege requirements
Query variables
systenants and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the value of global system variables.Modify variables
systenants can directly modify the value of global system variables.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of global system variables.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the value of global system variables.
Attributes
| Attribute | Description |
|---|---|
| Type | Enum |
| Default value | on |
| Value range | on: The user password cannot be the same as the username.off: The user password can be the same as the username. |
| Scope | Global |
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Usage
This variable takes effect only when the value of the validate_password_policy variable is MEDIUM.
Examples
Set the user password to be different from the username.
obclient> SET GLOBAL validate_password_check_user_name = on;
References
For more information about password complexity, see Password complexity.