Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deal with the ERROR 1819 error when setting a simple password in mysql5.7

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following brings you about mysql5.7 setting simple password report ERROR 1819 error how to deal with, if you are interested, let's take a look at this article, I believe that after reading the mysql5.7 setting simple password report ERROR 1819 error how to deal with it more or less helpful.

[question]

Sometimes, just to test yourself, you don't want the password to be so complicated, for example, you just want to set the password for root to 123456.

SET PASSWORD FOR 'root'@'localhost' = PASSWORD (' 123456')

But will report an error:

Mysql > SET PASSWORD FOR 'root'@'localhost' = PASSWORD (' 123')

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

[reason]

After the original MySQL5.6.6 version, the password strength verification plug-in validate_password is added, and the relevant parameters are set more strictly.

Using this plug-in will check whether the password set conforms to the currently set strength rules, and reject the setting if not. The affected statements and functions are: create user,grant,set password,password (), old password.

[solution]

1) View mysql global parameter configuration

The problem is actually related to the value of the validate_password_policy of mysql.

Take a look at several global parameters related to the msyql password:

Mysql > select @ @ validate_password_policy

+-+

| | @ @ validate_password_policy |

+-+

| | MEDIUM |

+-+

1 row in set (0.00 sec)

Mysql > SHOW VARIABLES LIKE 'validate_password%'

+-+ +

| | Variable_name | Value |

+-+ +

| | validate_password_dictionary_file |

| | validate_password_length | 8 |

| | validate_password_mixed_case_count | 1 | |

| | validate_password_number_count | 1 | |

| | validate_password_policy | MEDIUM |

| | validate_password_special_char_count | 1 | |

+-+ +

6 rows in set (0.08 sec)

2) Parameter interpretation

Validate_password_dictionary_file

The dictionary file path that the plug-in uses to verify password strength.

Validate_password_length

The minimum password length. The default parameter is 8, which is limited by the minimum value: validate_password_number_count + validate_password_special_char_count + (2 * validate_password_mixed_case_count).

Validate_password_mixed_case_count

The password should contain at least the number of lowercase letters and uppercase letters.

Validate_password_number_count

The password must contain at least the number of digits.

Validate_password_policy

Password strength check level: 0/LOW, 1/MEDIUM, 2/STRONG. The following values are available:

Policy Tests Performed

0 or LOW Length

1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters

2 or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file

The default is 1, that is, MEDIUM, so the password you set at the beginning must match the length and must contain numbers, lowercase or uppercase letters, and special characters.

Validate_password_special_char_count

At least the number of special characters that the password must contain.

3) modify the configuration of mysql parameters

Mysql > set global validate_password_policy=0

Query OK, 0 rows affected (0.05 sec)

Mysql >

Mysql >

Mysql > set global validate_password_mixed_case_count=0

Query OK, 0 rows affected (0.00 sec)

Mysql > set global validate_password_number_count=3

Query OK, 0 rows affected (0.00 sec)

Mysql > set global validate_password_special_char_count=0

Query OK, 0 rows affected (0.00 sec)

Mysql > set global validate_password_length=3

Query OK, 0 rows affected (0.00 sec)

Mysql > SHOW VARIABLES LIKE 'validate_password%'

+-+ +

| | Variable_name | Value |

+-+ +

| | validate_password_dictionary_file |

| | validate_password_length | 3 | |

| | validate_password_mixed_case_count | 0 | |

| | validate_password_number_count | 3 | |

| | validate_password_policy | LOW |

| | validate_password_special_char_count | 0 | |

+-+ +

6 rows in set (0.00 sec)

4) modify the simple password:

Mysql > SET PASSWORD FOR 'root'@'localhost' = PASSWORD (' 123')

Query OK, 0 rows affected, 1 warning (0.00 sec)

Read the above about mysql5.7 setting simple password report ERROR 1819 error how to deal with the details, whether there is anything to gain. If you want to know more about it, you can continue to follow our industry information section.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report