MySQL 5.5 on CentOS/RHEL 6.7 and 5.11 via Yum


Redhat Enterprise Linux (RHEL) 5.x and CentOS 5.x have been providing MySQL 5.0 in it’s distribution since that was the active stable branch when RHEL 5.0 was released on 14th March 2007 (CentOS 5.0 on 12th April 2007). Since then, Sun/Oracle have released MySQL 5.1 and MySQL 5.5, so the Webtatic Yum repository has added them to it’s web stack, which now provides updated versions of all the AMP in LAMP.

Update 2014-03-01 – mysql55 packages have been renamed to mysql55w packages (as well as mysql51 to mysql51w). This is to ensure it doesn’t clash with SCL packages.
Update 2013-05-11 – Updated guide to include Webtatic EL6 mysql55w installation and simplfied package upgrade

First, to set up the yum repository, install the webtatic-release RPM based on your CentOS/RHEL release:

Webtatic EL6 for CentOS/RHEL 6.x

rpm -Uvh

Webtatic EL5.1 for CentOS/RHEL 5.x:

rpm -Uvh

If you already have MySql client or server installed (rpm -q mysql mysql-server), then you can upgrade using the following method:

yum install mysql.`uname -i` yum-plugin-replace
yum replace mysql --replace-with mysql55w

“yum install mysql” is only there to make sure yum-plugin-replace can resolve dependencies correctly if only mysql-server was installed.

Otherwise, to install MySql client and server, then run:

yum install mysql55w mysql55w-server

You should upgrade existing tables before setting the server to become a production machine, which can be done by starting the server and running the mysql_upgrade script (this may take time depending on the size of the database).

service mysqld start
# This will issue a password prompt for the user. If you don't have a root user password, remove the "-p"
mysql_upgrade -u root -p

MySQL 5.1

The Webtatic 5 repository for CentOS/RHEL 5.x includes mysql51-* packages for installing MySQL 5.1. This can be installed by replacing in the above commands “mysql55w” with “mysql51w”.

As MySQL 5.1 is standard in CentOS/RHEL 6.x, it is not included in the Webtatic EL 6 repository.


Who's Online

We have 13 guests and no members online