0. 关闭selinux和防火墙
vim /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
设置后需要重启才能生效
systemctl stop firewalld
systemctl disable firewalld
yum install wget vim -y
1.安装mysql5.7
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
yum localinstall mysql57-community-release-el7-8.noarch.rpm -y
vim /etc/yum.repos.d/mysql-community.repo
yum install mysql-community-server -y
systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld
vim /var/log/mysqld.log
搜索 temporary password
set global validate_password_policy=LOW;
set global validate_password_length=4;
alter user 'root'@'localhost' identified by 'ro