Upgrade MySQL on a fresh install of RedHat 6.2


How do I upgrade MySQL on my new Virtualmin install?
It is a RedHat Enterprise 6.2 with MySQL 5.1 and would like to have 5.5.22



You’re using the most recent version of MySQL available to RHEL 6.2.

We’d recommend using the software versions that come with RHEL.

Your only other option would be to find MySQL in a third party repository – but we wouldn’t recommend that, as it’s less tested than the software versions available in RHEL.


Hi Eric,
Could I uninstall redhat packages and re-install it using the RPMs from the MySQL site?
Would it break Virtualmin ou anything else?


  • Rogerio

I use the remi repository, it contains PHP 5.3.10 and MySQL 5.5.22 at present, they are going to update PHP to 5.4.0 in a few weeks.

They compile and release the latest versions of PHP & MySQL, so you will be constantly up to date, although some applications might break, say when MySQL 5.6.0 is released or such.

Hi lp86,

And how do I install only PHP and MySQL from the Remi repository? If I install the repository using remi-release-6.rpm, and then run a “yum update” I will update the system with everything they have, right? How do I update PHP and MySQL from Remi, and still be able run “yum update” to update everything else from the RedHat repository?



Yes, Don’t install the EPEL repository though, it replaces some of the virtualmin recommended packages (AWStats, ClamAV, Spamassassin, etc) and I don’t know what that will do to Virtualmin.

*** First, Backup all of your MySQL databases, you can use the module in Webmin or do it with phpMyAdmin. ***

Just do this as root from the command line

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm
yum update

This will upgrade your PHP & MySQL packages, everything else will stay the same and continue to update normally.

After its upgraded run this


It will check the database schema and make sure everything is upgraded ok internally

Didn’t work:

[root@linux05 instaladores]# rpm -Uvh remi-release-6.rpm warning: remi-release-6.rpm: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY error: Failed dependencies: epel-release >= 6 is needed by remi-release-6-1.el6.remi.noarch [root@linux05 instaladores]#

Is there another way?


rpm -Uvh remi-release-6.rpm --nodeps

Excellent lp86!
PHP and MYSQL successfully updated!
Thank you very much,



Make sure you run “mysql_upgrade” to check/upgrade database schema

Yes, already run

/usr/bin/mysql_upgrade -p and /usr/bin/mysql_secure_installation -p
Thank you!