1.rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm # download

2.yum install yum-utils -y # source loading

3.yum-config-manager --disable mysql56-community   # disable the MySQL5.6 source

4.yum-config-manager --enable mysql57-community-dmr # enable MySQL5.7 source

5.yum repolist enabled | grep mysql

6.yum install mysql-community-server  # mysql installation
Copy the code

Some of them will report an error when they get here

Mysql: mysql-community-server-5.7.20-1.el6.x86_64 (mysql57-community) mysql-community-server-5.7.20-1.el6.x86_64 Libsasl2.so.2()(64bit) : RPM -va --nofiles --nodigestCopy the code

Solutions:

Repo [mysql57-community] name= mysql 5.7 community Server [mysql57-community] name= mysql 5.7 community Server [mysql57-community] name= mysql 5.7 community ServerCopy the code

Change the source ADDRESS of the destination YUM

## baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/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-mysqlCopy the code

7. Yum install mysql-community-server