I have a CentOS 6 host running a MySQL server. I want to migrate this server away from the MySQL Enterprise Server packages to MySQL Community Server packages, with the following specifics:

  • The MySQL Enterprise RPMs are called mysql-commercial-something and are at version '5.7.22-1.1'. I store these in a custom repo.
  • The Community RPMs are called mysql-community-something, and the latest available version is '5.7.22-1', which is a single '.1' release behind the Commercial version. These are stored in a public repo (http://repo.mysql.com/ ).

Since the Community RPM has version number which is slightly behind the Commercial version, I cannot simply swap out one package for another. Yum complains with the error "Package foo-1 is obsoleted by foo-1.1":

[root@devdb ~]# yum list --quiet available 'mysql-*-server'
Available Packages
mysql-community-server.x86_64                   5.7.22-1.el6                    mysql57-community
[root@devdb ~]# 
[root@devdb ~]# yum install --quiet mysql-community-server
Package mysql-community-server-5.7.22-1.el6.x86_64 is obsoleted by mysql-commercial-server-5.7.22-1.1.el6.x86_64 which is already installed
[root@devdb ~]# 

I've tried a couple things, such as specifying the specific version number presented in How to install an older version of php (5.2.17) in Linux?, but that doesn't work in this case:

[root@devdb ~]# yum install --quiet mysql-community-server-5.7.22-1.el6.x86_64 
Package mysql-community-server-5.7.22-1.el6.x86_64 is obsoleted by mysql-commercial-server-5.7.22-1.1.el6.x86_64 which is already installed
[root@devdb ~]#

How can I force Yum to use use a package with an older version number?

  • Have you tried yum remove mysql-community-server first? May 22, 2018 at 22:18
  • Yes. Unfortunately, that runs in to a common issue between the RHEL packages and the MySQL/MariaDB/Percona packages (See gist.github.com/stefanlasiewski/… & forums.mysql.com/read.php?117,651266,651266,quote=1). It's a MySQL-specific issue that I didn't want to get into here. I'm hoping to work around this MySQL-specific issue by simply using Yum to install an equivalent version of mysql-community on this server. May 22, 2018 at 23:58
  • Then I don't know what to tell you. From what I can surmise from what you've shown on Github, you don't want to remove the dependencies (specifically percona). It doesn't look as though what you're doing is possible by using yum because what you're trying to install is obsoleted and conflicts with what's already installed and you can't remove the latter because you want the dependencies. The only solution that might work would be to build it from source which it doesn't look like is possible with this package. May 23, 2018 at 0:20
  • 1
    Haven't tried this myself, but my first thought would be to run yum downgrade mysql-community-server. May 23, 2018 at 0:46
  • 1
    Have you tried to run yum clean and then run yum --disablerepo=<yourcustomrepo> install mysql-community-server? May 23, 2018 at 20:40

1 Answer 1


I couldn't find a way to do this with Yum only. What I ended up doing was a two step process:

  1. Use rpm to remove the mysql-commercial-* packages, but don't remove any dependencies.

    [root@devdb ~]# rpm --erase --nodeps mysql-commercial-server mysql-commercial-libs-compat mysql-commercial-client mysql-commercial-common mysql-commercial-libs
    warning: /etc/my.cnf saved as /etc/my.cnf.rpmsave
    [root@devdb ~]#
  2. And then use Yum to install the mysql-community packages, at the closest version number I can find:

    [root@devdb ~]# yum --disablerepo=local-mysql-enterprise install mysql-community-libs-5.6.40-2.el6.el6.x86_64 mysql-community-common-5.6.40-2.el6.el6.x86_64 mysql-community-client-5.6.40-2.el6.el6.x86_64 mysql-community-libs-compat-5.6.40-2.el6.el6.x86_64 mysql-community-server-5.6.40-2.el6.el6.x86_64 
      mysql-community-client.x86_64 0:5.7.22-1.el6               mysql-community-common.x86_64 0:5.7.22-1.el6
        mysql-community-libs.x86_64 0:5.7.22-1.el6                 mysql-community-libs-compat.x86_64 0:5.7.22-1.el6
        mysql-community-server.x86_64 0:5.7.22-1.el6
    [root@devdb ~]#
  3. And restore some core files:

    [root@devdb ~]#cp /etc/my.cnf.rpmsave /etc/my.cnf
    [root@devdb ~]#

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .