I run a bunch of WordPress sites on a CentOS6 server and have been seeing notices to upgrade WordPress to version 4.2. The problem is that my version of MySQL is not supported by WordPress 4.2. The simple solution is to fire up yum and upgrade my current installation of MySQL. Sadly, the default yum repositories do not contain a package for the updated MySQL. So, below are the steps I followed to update MySQL 5.1 to 5.5.
- Back up all MySQL databases using mysqldump
- Remove the old version of MySQL
yum remove mysql mysql-*
- Download updated repositories for CentOS6
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
- Install new MySQL
yum --enablerepo=remi,remi-test install mysql mysql-server
- Start MySQL
service mysqld start
- Make MySQL start on bootup
chkconfig --levels 235 mysqld on
- Check for any updates
mysql_upgrade -u root -p
I noticed that when I removed the old version of MySQL, the data files were leftover so when I installed the new version of MySQL all my databases were good to go. But, it is always a good practice to do a full backup when doing any type of software updates, especially when you uninstall software. Better to be safe than sorry.