EmergencyEMERGENCY? Get 24/7 Help Now!

Switching between versions using yum

 | September 17, 2013 |  Posted In: Insight for DBAs, MySQL, Percona Server, Percona XtraDB Cluster


YUM (Yellowdog Updater Modified) is a free package management software for Linux Yellowdog.One type of question we get very often (even in the form of filed bugs!) is how to switch from stock MySQL to Percona Server or switch from Percona Server 5.5 to Percona XtraDB Cluster using yum, but à la apt-get, i.e. having yum handle the replace.

In its simplest form, yum cannot replace a package¹ for another like apt-get does:


# yum -q -q install Percona-XtraDB-Cluster-server
Error: Percona-XtraDB-Cluster-server conflicts with Percona-Server-server-55
Error: Percona-XtraDB-Cluster-client conflicts with Percona-Server-client-55
Error: Percona-XtraDB-Cluster-shared conflicts with Percona-Server-shared-55

One solution for this is to manually uninstall Percona Server 5.5 and then install version 5.1, however you can run into issues if you’ve got installed software that depends on Percona Server — it will get uninstalled as well.

We can solve this by instructing yum to remove all 5.1 packages and install 5.5 in one transaction, using the yum shell.

# yum -q -q shell
> remove Percona-Server-client-55 Percona-Server-server-55 Percona-Server-shared-55
> install Percona-XtraDB-Cluster-server
> transaction run

Installing for dependencies:

Transaction Summary
Install 4 Package(s)
Update 0 Package(s)
Remove 3 Package(s)

This is also the easiest way for switching between Percona XtraBackup versions. For example, switching from 2.1 to our recently released 2.0 packages, without uninstalling XtraBackup:

# yum -q -q install percona-xtrabackup-20
Error: percona-xtrabackup-20 conflicts with percona-xtrabackup
# yum -q -q shell
> remove percona-xtrabackup
> install percona-xtrabackup-20
> transaction run

Note, however, that’s not possible to switch from 5.1 to 5.5, or from 5.5 to 5.6 directly, due to restrictions in the automated update process: the updater cancels the transaction and asks you to manually update the server package in order to safeguard the data. We’re working on the possibility of lifting this restriction.

This shouldn’t represent a problem for switching between versions without uninstalling dependencies though, since this restriction only applies to the Percona-Server-server-5x packages, and the dependencies are usually on the client or shared packages. Just execute the transaction installing the client and shared packages, and install the server package in another step.

¹ unless one of them Obsoletes: the other.

Ignacio Nin

Ignacio is a former Percona employee.

Leave a Reply


Percona’s widely read Percona Data Performance blog highlights our expertise in enterprise-class software, support, consulting and managed services solutions for both MySQL® and MongoDB® across traditional and cloud-based platforms. The decades of experience represented by our consultants is found daily in numerous and relevant blog posts.

Besides specific database help, the blog also provides notices on upcoming events and webinars.
Want to get weekly updates listing the latest blog posts? Subscribe to our blog now! Submit your email address below and we’ll send you an update every Friday at 1pm ET.

No, thank you. Please do not ask me again.