In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Security has increased significantly since mysql upgraded version 5. 7.
But... I can't remember with complicated ones. Uh... no, no. Originally the brain is not working well, but it is so complicated to remember, especially locally, it is even more unnecessary, or root is convenient.
Enter mysql
Mysql > SHOW VARIABLES LIKE 'vali%' +-- +-+ | 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.00 sec)
According to the official documents, it can be found that the policy is 1, that is, MEDIUM
5.7The plug-in is installed by default. If not, SHOW VARIABLES LIKE 'vali%' will return null. The value values of the corresponding parameters are also default values. Here is an explanation of these values.
The minimum length of the validate_password_length 8 # password, in this case 8. Validate_password_mixed_case_count 1 # must contain at least the number of lowercase or uppercase letters, in this case 1. Validate_password_number_count 1 # must contain at least the number of digits, in this case 1. Validate_password_policy MEDIUM # strength rating, where the value can be set to 0, 1, 2. Corresponding to: [0/LOW]: only the length is checked. [1/MEDIUM]: check numbers, case, and special characters on the basis of level 0. [2/STRONG]: check the special character dictionary files on the basis of level 1, which is 1 here. Validate_password_special_char_count
1 # must contain at least the number of characters, in this case 1.
So you must change your password to meet the following requirements: numbers, lowercase letters, uppercase letters, special characters, at least 8 digits in length
How to change it?
To close the plug-in, add it to the configuration file
Just validate_password=off and restart mysqld:
Add to the vim / etc/my.cnf configuration file
[mysqld] validate_password=off
Then restart mysql and ok.
Restart mysqld
# / etc/init.d/mysqld restart (service mysqld restart)
If you want to change your password back and enter mysql
The database that performs 5.7has no password field and uses the authentication_string field.
Mysql > update mysql.user set authentication_string=password ('root') where user='root'
Finally, you also need to set the expiration time to prevent the password from becoming invalid.
Add to / etc/my.cnf configuration file
[mysqld] default_password_lifetime=0
Or set it directly through the command
ALTER USER 'script'@'localhost' PASSWORD EXPIRE NEVER
Summary
The above is the treatment method of changing the mysql5.7.20 password under linux CentOS 7.4 introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.