MySQL upgrade/update using yum update

I have installed MySQL manually using rpm and familiar with process.
However, I would like to know how does yum update process works for MySQL.
Questions :

  1. How do I check which MySQL version yum is going to pickup ? How to I know whether it is going to pickup Percona or Community ? How do I check this ?
  2. When we do yum update, what process does it follows for mysql upgrade e.g. lets say If I have MySQL 5.5.42-37.1 Percona Server , would it be upgraded to MySQL 5.5.42-37.3 version or 5.6 some version ?
  3. Normal upgrade process requires that we unistall previous version and then install new version and do mysql_upgrade process, does yum follows same process.
  4. What about backup before upgrade ?

Thanks a lot.

Hi Sanjay92;

Check out the below page from the MySQL manual for more information about upgrading via Yum:

If Yum sees that you have Community MySQL installed, then it should only upgrade that to other Community MySQL builds, and similar if it sees you have Percona Server installed, it should only upgrade to other Percona Server builds. By default, it should upgrade to a later version in the same series (i.e. if you have 5.5.x, it should upgrade to a newer version of 5.5.x). Though that partly depends on what repositories you have setup on the server, and what yum finds. So when you run any commands with Yum, just make sure to check what it is trying to do before saying “yes”. It should tell you the package and the version that it is wanting to install / upgrade to.

And as usual, make sure to test this on a development server first. =)


Thanks Scott.
I am still no clear whether yum update process of mysql is fully automated . I can see it would stop mysql and then uninstall version and install new version but does it run mysql_upgrade .
Based on manual upgrade process, we need to do following :
/usr/sbin/mysqld --skip-grant-tables --user=mysql &
and run mysql_pgrade

So does yum upgrade process follow about guidelines or we have to do it manually or does these steps are not required when upgrading 5.5.x to 5.5.y.

Thanks a lot.

Hi sanjay92;

According to the above link, yum will restart MySQL for you after the upgrade, but then you must run mysql_upgrade yourself. I do not manage MySQL through Yum, so unfortunately I cannot give you any more specific feedback or advice in that area.


Hi Scott,

I’m upgrading the percona mysql 5.5 to Percona mysql server 5.6.27-75.0 in ubuntu 14.04 and getting some error. Could you please help me.

I have done the steps below.
sudo apt-key adv --keyserver --recv-keys 1C4CBDCDCD2EFD2A
echo “deb “$(lsb_release -sc)” main” |sudo tee /etc/apt/source.list.d/percona.list

echo “deb-src “$(lsb_release -sc)” main” |sudo tee -a /etc/apt/sources.list.d/percona.list

sudo apt-get update

apt-get -f install

Getting error on

Reading package lists… Done
W: Duplicate sources.list entry trusty/main amd64 Packages (/var/lib/apt/lists/ap-southeast-1.ec2.archive.ubuntu.com_ubuntu_dists_trusty_main_binary-amd64_Packages)
W: Duplicate sources.list entry trusty/universe amd64 Packages (/var/lib/apt/lists/ap-southeast-1.ec2.archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages)
W: Duplicate sources.list entry trusty/multiverse amd64 Packages (/var/lib/apt/lists/ap-southeast-1.ec2.archive.ubuntu.com_ubuntu_dists_trusty_multiverse_binary-amd64_Packages)
W: You may want to run apt-get update to correct these problems