CentOS7 mounting mysql-5.7

First, download and install the yum source, and online install mysql

  Official website to download source yum

  https://dev.mysql.com/downloads/repo/yum/

  yum -y install mysql80-community-release-el7-3.noarch.rpm

  yum -y install mysql-community-server

Second, start mysql and set the boot

  systemctl start mysqld

  systemctl enable mysqld

  systemctl daemon-reload

Third, modify the mysql passwords and permissions

  # Obtain an initial password

  grep 'password' /var/log/mysqld.log

  After the initial password to log mysql change the root password, you can do a weak password restrictions

  my.cnf add the configuration and reboot

= explicit_defaults_for_timestamp to true 
validate_password.policy = 0 # password complexity lowest level 
validate_password.length = 0 # minimum password length

  Configure a new root password

  SET password = 'password';

  View password strength settings

  

mysql> SHOW VARIABLES LIKE 'vali%';
+--------------------------------------+-------+
| Variable_name                        | Value |
+--------------------------------------+-------+
| validate_password.check_user_name    | ON    |
| validate_password.dictionary_file    |       |
| validate_password.length             | 4     |
| validate_password.mixed_case_count   | 1     |
| validate_password.number_count       | 1     |
| validate_password.policy             | LOW   |
| validate_password.special_char_count | 1     |
+--------------------------------------+-------+

The minimum password length validate_password_length 8 #
validate_password_mixed_case_count 1 # to include at least the number of the lowercase or uppercase letters.
The number must contain at least validate_password_number_count 1 # numbers.
validate_password_policy LOW # intensity level, wherein the value may be set to 0,1,2. Respectively:
[0 / LOW]: check only the length.
[1 / MEDIUM]: multi-level checks on the basis of the numbers 0, capitalization and special characters.
[2 / STRONG]: Multi-check special characters in the dictionary file on the basis of a grade, here is one.
The number of validate_password_special_char_count 1 # number of characters to include at least.

 

Guess you like

Origin www.cnblogs.com/suminem/p/10972874.html