MySQL 5.6 Password Strength plugin use

Source: Internet
Author: User

The strength of the password was enhanced in MySQL 5.6, and the Validate_password plugin was introduced. Support for password strength requirements.

This plugin requires version: 5.6.6 or later
Installation method:

1. Install the plug-in: (By default, the plug-in is installed, the strength plug-in is enabled, close, required in the configuration file if the relevant shutdown parameters)

Mysql>install PLUGIN validate_password SONAME ' validate_password.so ';

2. Add some parameters to the configuration file:

[Mysqld]

Plugin-load=validate_password.so

validate_password_policy=2

Validate-password=force_plus_permanent

3. After processing, you can test:

mysql> SET PASSWORD = PASSWORD (' abc ');

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

mysql> SET PASSWORD = ' *0d3ced9bec10a777aec23ccc353a8c08a633045e ';

Query OK, 0 rows affected (0.01 sec)

4. Related notes:

(1). Related options:

Validate-password=on/off/force/force_plus_permanent: Decide whether to use the plug-in (and force/permanently force use).

Validate_password_dictionary_file: The dictionary file path that the plugin uses to verify password strength.

Validate_password_length: Minimum password length.

Validate_password_mixed_case_count: The password must contain at least the number of lowercase letters and uppercase letters.

Validate_password_number_count: The number of digits that the password must contain at least.

Validate_password_policy: Password strength check level, 0/low, 1/medium, 2/strong.

Validate_password_special_char_count: The minimum number of special characters the password should contain.

Among them, about validate_password_policy-password strength Check level:

0/low: Check the length only.

1/medium: Check length, number, case, special characters.

2/strong: Check the length, number, case, and special character dictionary files.

(2). Plug-in installation enabled:

The library object file corresponding to the plugin needs to be in the directory specified in configuration options plugin_dir.

You can use--plugin-load=validate_password.so to load the plug-in at server startup or write plugin-load=validate_password.so to the configuration file.

You can also load a plug-in from the server runtime by using the following statement (it will register into the Mysql.plugins table)

mysql> INSTALL PLUGIN validate_password SONAME ' validate_password.so ';

(3). To prevent the plugin from being deleted at run time, you can add it in the configuration file:

[Mysqld]

Plugin-load=validate_password.so

Validate-password=force_plus_permanent

MySQL 5.6 Password Strength plugin use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.