原文地址:http://www.percona.com/blog/2015/01/05/using-yum-to-install-specific-mysqlpercona-server-versions/
root@ubuntu-14:~# apt-cache madison mysql-community-server
[root@localhost ~]# yum repolist
[root@localhost ~]# yum -q list available --showduplicates mysql-community-server.x86_64
[root@localhost ~]# yum -q list available --showduplicates MariaDB-server.x86_64
[root@localhost ~]# yum -q list available --showduplicates Percona-Server-server-56.x86_64
[root@localhost ~]# yum -q install Percona-Server-server-56-5.6.19-rel67.0.el6 Percona-Server-client-56-5.6.19-rel67.0.el6 Percona-Server-shared-56-5.6.19-rel67.0.el6
[root@localhost ~]# service mysql status
SUCCESS! MySQL (Percona Server) running (1998)
[root@localhost ~]# service mysql stop
Shutting down MySQL (Percona Server).. SUCCESS!
[root@localhost ~]# yum -q downgrade Percona-Server-server-56.x86_64 Percona-Server-client-56.x86_64 Percona-Server-shared-56.x86_64
================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================
Downgrading:
Percona-Server-client-56 x86_64 5.6.17-rel66.0.el6 percona-release-x86_64 6.8 M
Percona-Server-server-56 x86_64 5.6.17-rel66.0.el6 percona-release-x86_64 19 M
Percona-Server-shared-56 x86_64 5.6.17-rel66.0.el6 percona-release-x86_64 720 k
Transaction Summary
================================================================================================================================
Downgrade 3 Package(s)
Is this ok [y/N]: y
Giving mysqld 5 seconds to exit nicely
(...)
[root@localhost ~]# rpm -qa|grep Percona
Percona-Server-shared-56-5.6.17-rel66.0.el6.x86_64
Percona-Server-server-56-5.6.17-rel66.0.el6.x86_64
Percona-Server-client-56-5.6.17-rel66.0.el6.x86_64
[root@localhost ~]# yum -q downgrade Percona-Server-server-56-5.6.15-rel63.0.519.rhel6 Percona-Server-client-56-5.6.15-rel63.0.519.rhel6 Percona-Server-shared-56-5.6.15-rel63.0.519.rhel6
[root@localhost ~]# yum shell
[root@localhost ~]# yum -q update
To prevent that, we should lock our packages on current version. To achieve that, we need yum-plugin-versionlock package which allows us to do this:
[root@localhost ~]# yum versionlock Percona-Server-server-56 Percona-Server-client-56 Percona-Server-shared-56
yum versionlock clear
[root@localhost ~]# yum -q versionlock list
[root@localhost ~]# yum versionlock delete '0:Percona-Server-client-56-5.6.15-rel63.0.519.rhel6.*'
==========================================================================================
955 yum remove mysql*
956 rpm -qa |grep -i percona
957 yum remove percona*
958 yum install mysql55w-server
959 rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
960 yum install mysql55w-server
961 history