Complete the code to check the current password policy level in MySQL.
SHOW VARIABLES LIKE '[1]';
The variable validate_password_policy shows the current password policy level in MySQL.
Complete the code to set the password policy to 'STRONG' in MySQL.
SET GLOBAL validate_password_policy = '[1]';
Setting validate_password_policy to STRONG enforces the strongest password rules.
Fix the error in the code to set the minimum password length to 12.
SET GLOBAL validate_password_length = [1];The value must be a number without quotes to set the minimum password length.
Fill both blanks to create a user with a password that meets the policy.
CREATE USER 'user1'@'localhost' IDENTIFIED BY '[1]'; ALTER USER 'user1'@'localhost' PASSWORD EXPIRE [2];
The password must be strong like 'Str0ngPass!'. The password expiration should be set to 'IMMEDIATE' to force change on first login.
Fill all three blanks to enforce password policy and check the current minimum length.
SET GLOBAL validate_password_policy = '[1]'; SET GLOBAL validate_password_length = [2]; SHOW VARIABLES LIKE '[3]';
Set policy to 'MEDIUM', minimum length to 10, and check the 'validate_password_length' variable.