Today you’re going to learn how to upgrade MySQL 5.1 to MySQL 5.5 on CentOS 6.7. This article assumes that you are running the CentOS BASE version of MySQL 5.1. We are ALSO assuming that you are not running this on a live, production environment. 


If you do plan on running this on a live server, please make sure to backup your databases beforehand. You will also need to run the mysql_upgrade command after the upgrade from 5.1 to 5.5, to make sure all databases and tables are compatible.


1. Confirm your version of MySQL is CentOS 6.7 default


Type in the following to confirm that you have CentOS 6.7 default of MySQL 5.1 installed:


rpm -qa | grep mysql


Output should look similar to the following:




Everything looks good, moving on!



2. Install and activate the REMI and EPEL RPM Repositories


If you have not done so already, install and activate the REMI and EPEL repositories;


wget && rpm -Uvh epel-release-latest-6.noarch.rpm

wget && rpm -Uvh remi-release-6*.rpm


Now to enable the REMI repository globally:


nano /etc/yum.repos.d/remi.repo


Under the section that looks like [remi] make the following changes:


name=Remi's RPM repository for Enterprise Linux 6 - $basearch


Type CTRL-O to save, and CTRL-X to exit



2. Update MySQL from 5.1 to 5.5


Simply type in the following:


yum -y update mysql*


Once that’s done, we can verify:


rpm -qa | grep mysql


And we should see something similar to the below:




Now we need to make sure MySQL is working correctly.


If you’ve set a root password already, type the following;


mysql -u root -p


If you have not yet set a root password, you can simply type;




You should see something similar to the following


Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.45 MySQL Community Server (GPL) by Remi


There you go! That was easy right?