Percona mysql5.7 centos/red hat-rpm package does not display a password during installation. It is in the error log. The automatically generated my.cnf contains this line of Log-error=/var/log/mysqld.log.
So, here's our password:
[Email protected] lyh]# cat/var/log/mysqld.log | grep "Temporary password"
2017-06-26t04:28:05.537965z 1 [Note] A temporary password is generated for [email protected]:
Ca!wb/i+l7el
Attention! Special symbols need to be escaped through the above login MySQL.
[Email protected] lyh]# Mysql-uroot-pca\!wb\/i+l7el
If the following prompt appears, follow the steps.
You must reset your password using the ALTER USER statement before executing this statement.
Step 1: SET PASSWORD = PASSWORD (' root ');
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
If you are prompted that the password security level is too low, you need to modify the global variables as follows
Step 2:set Global validate_password_policy=0;
Step 3 set Global validate_password_mixed_case_count=2;
Step 4:alter USER ' root ' @ ' localhost ' PASSWORD EXPIRE never;
Step 5:flush privileges;
Authorization: Grant all on * * to ' root ' @ '% ' identified by ' Lghs35123 ' with GRANT option;
Open firewall port centos7:firewall-cmd--zone=public--add-port=3306/tcp--permanent
Note that different inux versions of the firewall command are different.
This article is from the "Lin Yuanxian blog" blog, make sure to keep this source http://lyhmm.blog.51cto.com/1797932/1943516
Percona mysql5.7 Default Password