1.列出安装的包
# rpm -qa | grep mariadb
mariadb-libs-5.5.41-2.el7_0.x86_64
2.卸载包
# rpm -e --nodeps mariadb-libs-5.5.41-2.el7_0.x86_64
3.安装rpm包
# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
[root@localhost ~]# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Retrieving http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
curl: (7) Failed connect to dev.mysql.com:443; Connection refused
error: skipping http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm - transfer failed
[root@localhost ~]# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Retrieving http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:mysql-community-release-el7-5 ################################# [100%]
4.查看当前可用的mysql安装资源
[root@localhost ~]# yum repolist enabled | grep "mysql.*-community.*"
Existing lock /var/run/yum.pid: another copy is running as pid 48035.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 152 M RSS (557 MB VSZ)
Started: Sat Nov 25 18:27:02 2017 - 37:44 ago