关闭SELinux
sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
setenforce 0
yum erase mariadb-*
下载MySQL5.7.9 yum仓库
#RHEL/CentOS 7
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
#RHEL/CentOS 6
wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm
#RHEL/CentOS 5
wget http://dev.mysql.com/get/mysql57-community-release-el5-7.noarch.rpm
#Fedora 23
wget http://dev.mysql.com/get/mysql57-community-release-fc23-7.noarch.rpm
#Fedora 22
wget http://dev.mysql.com/get/mysql57-community-release-fc22-7.noarch.rpm
#Fedora 21
wget http://dev.mysql.com/get/mysql57-community-release-fc21-7.noarch.rpm
安装MySQL yum仓库
rpm -ivh mysql57-community-release-*.rpm
#验证仓库
yum repolist enabled | grep "mysql.*-community.*"
#安装mysql
yum install mysql-community-server
#启动mysql
service mysqld start
#查看启动状态
service mysqld status
#获取临时密码
cat /var/log/mysqld.log|grep "A temporary password"
#修改密码
mysqladmin -uroot -p'temp pwd' password 'newpwd'