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


  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:

rpm -q mysql mysql-server


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

wget -q -O - | sh

Upgrade MySQL:

Now upgrade mysql:

yum 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)

mysql_upgrade -uadmin -p`< /etc/psa/.psa.shadow

Wrapping it up:

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

sudo service mysqld stop
sudo service mysqld start
sudo service mysqld status
mysqld (pid NNNN) is running...

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 🙂