配置文件: /etc/yum.repos.d/mysql-community.repo
```
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/7/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
[mysql-tools-community]
name=MySQL Tools Community
baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/7/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
```
安装命令:
```
yum install mysql-community-server-5.7.41-1.el7.x86_64 mysql-community-common-5.7.41-1.el7.x86_64 mysql-community-libs-compat-5.7.41-1.el7.x86_64 mysql-community-client-5.7.41-1.el7.x86_64 mysql-community-libs-5.7.41-1.el7.x86_64 -y
```
配置命令见回复
启动 MySQL-5.7: service mysqld start
拿到初始 root 密码, grep password /var/log/mysqld.log
登录 mysql 后执行 mysql 账号的初始化工作,
```
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Your_New_P4ssw0rd-Here';
```
#1