0
0
MySQLquery~5 mins

Password policies in MySQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a password policy in MySQL?
A password policy in MySQL is a set of rules that define the requirements for user passwords to improve security, such as minimum length, complexity, and expiration.
Click to reveal answer
beginner
Which MySQL system variable controls the password validation policy?
The validate_password.policy system variable controls the password validation policy in MySQL.
Click to reveal answer
intermediate
What are the possible values for validate_password.policy in MySQL?
Possible values are LOW, MEDIUM, and STRONG. Each level enforces different password complexity rules.
Click to reveal answer
intermediate
How can you set the minimum password length to 10 characters in MySQL?
Use the command: <br>SET GLOBAL validate_password.length = 10; <br>This sets the minimum password length to 10 characters.
Click to reveal answer
beginner
What happens if a password does not meet the current MySQL password policy?
MySQL will reject the password change or creation and return an error, forcing the user to choose a password that meets the policy requirements.
Click to reveal answer
Which MySQL plugin is commonly used to enforce password policies?
Avalidate_password
Baudit_log
Creplication
Dperformance_schema
What does setting validate_password.policy to STRONG require?
AOnly minimum length
BLength, mixed case, numbers, and special characters
CNo restrictions
DOnly numbers
How do you check the current password policy level in MySQL?
ADESCRIBE password_policy;
BSELECT * FROM users;
CSHOW VARIABLES LIKE 'validate_password.policy';
DSHOW STATUS;
If you want to disable password validation temporarily, what should you do?
ADROP USER 'root';
BSET GLOBAL validate_password.policy = LOW;
CSET GLOBAL validate_password.length = 0;
DUNINSTALL PLUGIN validate_password;
Which command sets the minimum number of special characters required in a password?
ASET GLOBAL validate_password.special_char_count = 2;
BSET GLOBAL validate_password.number_count = 2;
CSET GLOBAL validate_password.mixed_case_count = 2;
DSET GLOBAL validate_password.length = 2;
Explain how MySQL enforces password policies and how you can configure them.
Think about the plugin and system variables that control password rules.
You got /4 concepts.
    Describe the steps to change the password policy to require at least 12 characters and 2 special characters.
    Focus on system variables related to length and special characters.
    You got /3 concepts.