content
Start mysql, and check the running status, showing the initial password
download link:
https://downloads.mysql.com/archives/community/
CSDN download address
https://download.csdn.net/download/feng8403000/85003429
xftp upload package
Unzip the package
tar -xvf mysql-5.7.22-1.el7.x86_64.rpm-bundle.tar
Bulk install:
rpm -ivh mysql-community-common-5.7.22-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.22-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-libs-compat-5.7.22-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-client-5.7.22-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-server-5.7.22-1.el7.x86_64.rpm --nodeps --force
Some are fast and some are slow, just wait.
Start mysql, and check the running status, showing the initial password
systemctl start mysqld
systemctl status mysqld
grep password /var/log/mysqld.log
Login to MySQL
mysql -u root -p
Enter the queried initial password:
Change password and refresh:
set global validate_password_policy=0;
set password = password('大小写字母加数字至少8个长度');
flush privileges;
After exiting, log in again, and you will find that you can log in with your modified password.
extranet link
use mysql;
update user set host="%" where user="root";
flush privileges;