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 native JavaScript to simply implement the cou...
Preface When using the MySQL database, sometimes ...
Table of contents 1. Simple page example 2.uni-ap...
MySQL row to column operation The so-called row-t...
Recently, when I was working on CSS interfaces, I...
1. Download MySQL Click on the official website d...
This article shares the specific code for JavaScr...
MySQL and connection related timeouts Preface: To...
As we all know, SSH is currently the most reliabl...
1. Two types of DMA mapping 1.1. Consistent DMA m...
1. Cancel the blue color of the a tag when it is ...
MySQL allows you to create multiple indexes on th...
MySQL 8.0 compressed package installation method,...
01 The concept of parallel replication In the mas...
All websites, whether official, e-commerce, socia...