Starting from MySQL 5.7, many security updates have been added. Users of older versions may not be used to it. Here we introduce the database password issue for version 5.7. Versions 5.7.6 and later Versions 5.7.6 and later will generate a password and put it in the log file when starting the database, like this: [root@centos-linux ~]# cat /var/log/mysqld.log | grep 'password' 2016-07-16T03:07:53.587995Z 1 [Note] A temporary password is generated for root@localhost: 2=s6NZk.t:fz Then use the password to log in to the database, but you cannot perform any operations and will be prompted to change the password first. mysql> show databases; ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. When you modify the password here, you will encounter verification. Simple passwords will prompt that they do not comply with the rules. mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123'; ERROR 1819 (HY000): Your password does not satisfy the current policy requirements Because 5.7 introduced a validate_password plugin to check the password strength. The default values are as follows: 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.01 sec) The meaning is as follows: validate_password_length # The minimum length of the password, default is 8. validate_password_mixed_case_count # The minimum number of lowercase or uppercase letters required. The default is 1. validate_password_number_count # The minimum number of digits to be included. The default is 1. validate_password_policy # Strength level, can be set to 0, 1, 2. 【0/LOW】: Only check the length. [1/MEDIUM]: Checks numbers, uppercase and lowercase letters, and special characters based on level 0. [2/STRONG]: Check the special character dictionary file based on level 1. Here, it is 1. validate_password_special_char_count # The minimum number of special characters to be included. The default is 1. Therefore, the initial password should be greater than 8 characters and contain numbers, uppercase and lowercase letters, and special characters. You can also modify the above configurations to weaken password strength verification. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to use jconsole to monitor remote Tomcat services
Use OSS to upload pictures or attachments in vue ...
0. What is a tag? XML/HTML CodeCopy content to cl...
By default, Flash will always be displayed at the ...
Today, when learning PHP, of course, you have to ...
This article uses examples to explain the concept...
Note: The nginx version must be 1.9 or above. Whe...
Table of contents 1. How to switch 2. Dynamically...
Download the official website Choose the version ...
Introduction: Nginx (pronounced the same as engin...
This article shares the specific process of js ob...
Implementation requirements The form imitating El...
If you want the entire interface to have a backgr...
The optimization created by MySQL is to add index...
What is CSS# CSS (abbreviation of Cascading Style...
Table of contents nextTick Mixins $forceUpdate se...