1、进到/etc/yum.repos.d目录编辑mysql-community.repo 文件
[test@alps yum.repos.d]$ sudo vi mysql-community.repo
2、将enabled设置为0,如下面:
# Enable to use MySQL 5.6 [mysql56-community] name=MySQL 5.6 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/7/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
3、保存重新安装即可。
[test@alps yum.repos.d]$ sudo yum install mysql-server