# 添加官方的yum源 创建并且编辑mysql-community.repo
[root@SR ~]# vim /etc/yum.repos.d/mysql-community.repo
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/7/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
[root@SR ~]# yum -y install mysql-community-server # 安装
[root@SR ~]# systemctl start mysqld && systemctl enable mysqld # 启动
原文:https://www.cnblogs.com/SR-Program/p/13303768.html