CREATE PASSWORD POLICY
Creates a new password policy in TiDB Cloud Lake.
Syntax
CREATE [ OR REPLACE ] PASSWORD POLICY [ IF NOT EXISTS ] <policy_name>
[ PASSWORD_MIN_LENGTH = <number> ]
[ PASSWORD_MAX_LENGTH = <number> ]
[ PASSWORD_MIN_UPPER_CASE_CHARS = <number> ]
[ PASSWORD_MIN_LOWER_CASE_CHARS = <number> ]
[ PASSWORD_MIN_NUMERIC_CHARS = <number> ]
[ PASSWORD_MIN_SPECIAL_CHARS = <number> ]
[ PASSWORD_MIN_AGE_DAYS = <number> ]
[ PASSWORD_MAX_AGE_DAYS = <number> ]
[ PASSWORD_MAX_RETRIES = <number> ]
[ PASSWORD_LOCKOUT_TIME_MINS = <number> ]
[ PASSWORD_HISTORY = <number> ]
[ COMMENT = '<comment>' ]
Password Policy Attributes
This table summarizes essential parameters for a password policy, covering aspects like length, character requirements, age restrictions, retry limits, lockout duration, and password history:
Examples
This example creates a password policy named 'SecureLogin' with a minimum password length requirement set to 10 characters:
CREATE PASSWORD POLICY SecureLogin
PASSWORD_MIN_LENGTH = 10;