1. 用wget取安装包
若linux上没有wget,则需要先安装,yum install wget
选择下载的目录,执行以下操作
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
2. 开始安装
yum install -y mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
grep "password" /var/log/mysqld.log
mysql -uroot -p
3. 密码规则改一下,执行下面sql就可以了
set global validate_password_policy=0;
set global validate_password_length=1;
4. 修改密码
/usr/bin/mysql_secure_installation
5. 安装客户端
来源:https://www.cnblogs.com/lalala823581291/p/9932873.html