MySQL server shipped with CentOS 6 / RHEL 6 is still stuck at 5.1, which will soon be EOL. It will be prudent and sane to start preparing the migration to MySQL 5.5.
Here are the steps for the most sane and safe way to get MySQL 5.5 installed on a stock system (i.e. MySQL has not been installed yet, otherwise refer to the next section):
- Install the following repos: EPEL, RPMForge, IUS, and Remi. (The links provide an
xxx-release.rpmpackage which sets up everything, look out for that and install them, one for each repo.)
yum-plugin-replace. This is required for step 8.
- Enable yum plugins by editing
yum update mysql-libs --enablerepo=remi. Yum will fetch version 5.5 of mysql-libs from the remi repo.
yum replace mysql-libs --replace-with mysql55-libs. Yum will now replace
mysql-libsfrom the remi repo with
mysql55-libsfrom the ius repo.
You may see the following: “WARNING: Unable to resolve all providers: [‘libmysqlclient.so.18(libmysqlclient_18)(64bit)’, ‘mysql-libs(x86-64)’]”.
Ignore it and choose continue.
yum install mysql55-server mysql55. Yum will now fetch version 5.5 of MySQL client and server packages from the ius repo.
If you already have MySQL 5.1 installed on the system with the distro packages, you will need to following steps 1-5 from above first, then proceed below:
First, identify all mysql related packages already installed:
1 2 3
Then, drop into yum shell and remove and replace those packages within a single transaction:
1 2 3 4 5
That’s it. You should be able to successfully replace MySQL 5.1 packages with the 5.5 ones from the ius repository.