0
0
MySQLquery~10 mins

Password policies in MySQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to check the current password policy level in MySQL.

MySQL
SHOW VARIABLES LIKE '[1]';
Drag options to blanks, or click blank then click option'
Avalidate_password_policy
Bpassword_strength
Cpassword_policy_level
Dvalidate_password_level
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'password_strength' which is not a valid MySQL variable.
Using 'password_policy_level' which does not exist.
Using 'validate_password_level' which is incorrect.
2fill in blank
medium

Complete the code to set the password policy to 'STRONG' in MySQL.

MySQL
SET GLOBAL validate_password_policy = '[1]';
Drag options to blanks, or click blank then click option'
AMEDIUM
BLOW
CSTRONG
DHIGH
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'HIGH' which is not a valid policy level.
Using lowercase 'strong' which is case sensitive.
Using 'LOW' which is the weakest policy.
3fill in blank
hard

Fix the error in the code to set the minimum password length to 12.

MySQL
SET GLOBAL validate_password_length = [1];
Drag options to blanks, or click blank then click option'
A"12"
Btwelve
C'12'
D12
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around the number which causes a syntax error.
Using the word 'twelve' which is invalid.
Using double quotes which are treated as strings.
4fill in blank
hard

Fill both blanks to create a user with a password that meets the policy.

MySQL
CREATE USER 'user1'@'localhost' IDENTIFIED BY '[1]';
ALTER USER 'user1'@'localhost' PASSWORD EXPIRE [2];
Drag options to blanks, or click blank then click option'
AStr0ngPass!
BNEVER
CIMMEDIATE
Dweakpass
Attempts:
3 left
💡 Hint
Common Mistakes
Using a weak password like 'weakpass' that fails policy.
Setting expiration to 'NEVER' which disables password change enforcement.
5fill in blank
hard

Fill all three blanks to enforce password policy and check the current minimum length.

MySQL
SET GLOBAL validate_password_policy = '[1]';
SET GLOBAL validate_password_length = [2];
SHOW VARIABLES LIKE '[3]';
Drag options to blanks, or click blank then click option'
AMEDIUM
B10
Cvalidate_password_length
DLOW
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'LOW' which is too weak.
Quoting the number 10 which causes errors.
Checking the wrong variable name.