How to upgrade to MySQL 5.5 on CentOS

If you buy virtual hosting these days and it comes built with CentOS and Parallels chances are you will be stuck with MySQL 5.1 . Why is this bad? Aside from being old and outdated you may notice that some of your WordPress migrations now won’t work. If you are getting the following error during your mysql import:

#1273 – Unknown collation: ‘utf8mb4_unicode_ci’

This is because MySQL 5.1 doesn’t support 'utf8mb4_unicode_ci' collation and you need at least MySQL 5.5.3 for it to work. Thankfully it’s pretty easy and painless process to upgrade your MySQL. This was done on Parallels 12.8

Requirements

  1. You are familiar with SSH and have root access to your server
  2. You mysql installed on Centos

Prepping for install

Once you have SSHd into your server do a check to make sure that mysql is installed by typing:

RESULT:
mysql-5.1.69-1.el6_4.x86_64
mysql-server-5.1.69-1.el6_4.x86_64

Add Atomic repo to make sure we get the latest version:

Upgrade MySQL:

Now upgrade mysql:

you should get a list of installed dependencies as well. Now it’s time to upgrade the current databases with (you might need to add a ‘-f’ at the end to force it)

Wrapping it up:

You should be all good now. It’s a good idea to restart the service

You can now import your sql files with utf8mb4_unicode. Yey!!

While you in terminal already making your server better, why not install Google PageSpeed to speed up your site 🙂