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

The solution to the emergence of ERROR 1819 (HY000) in mysql

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

Share

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

This article mainly introduces in detail the solution to the emergence of ERROR 1819 (HY000) in mysql, which has a certain reference value. Interested friends can refer to it.

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements, what if this problem occurs? Don't worry, here's the answer.

To enhance security, MySQL5.7 randomly generates a password for root users, and in error log, with regard to the location of error log, the default is / var/log/mysqld.log if the RPM package is installed.

Generally, it can be set through log_error.

* mysql > select @ @ logerror

+-+

| | @ @ logerror |

+-+

| / var/log/mysqld.log |

+-+

1 row in set (0.00 sec) * *

You can obtain the temporary password of MySQL through the # grep "password" / var/log/mysqld.log command

After logging in to the server with this password, you must change the password immediately, otherwise the following error will be reported:

If you just change it to a simple password, the following error will be reported:

This is actually related to the value of validate_password_policy.

Validate_password_policy has the following values:

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.

Sometimes, just to test it myself, I don't want the password to be so complicated. For example, I just want to set the password for root to 123456.

Two global parameters must be modified:

First, modify the value of the validate_password_policy parameter

In this way, the criterion for judging the password is based on the length of the password. This is determined by the validate_password_length parameter.

The validate_password_length parameter defaults to 8, which is limited by a minimum value of:

Where validate_password_number_count specifies the length of the data in the password, validate_password_special_char_count specifies the length of special characters in the password, and validate_password_mixed_case_count specifies the length of large and small letters in the password.

For these parameters, the default value is 1, so the minimum value of validate_password_length is 4. If you explicitly specify that the value of validate_password_length is less than 4, although there will be no error, the value of validate_password_length will be set to 4. As follows:

If any of the values in the validate_password_number_count,validate_password_special_char_count,validate_password_mixed_case_count are modified, the validate_password_length will be modified dynamically.

Of course, the premise is that the validate_password plug-in must be installed, and MySQL5.7 is installed by default.

So how do you verify that the validate_password plug-in is installed? By looking at the following parameters, if it is not installed, the output will be empty.

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