Keeping your Drupal from Drooping — part 2

So let’s clone our current Drupal 7.22 site from MySQL 5.1 that came with CentOS 6.4 and get it running on MySQL 5.6.

Upgrading MySQL 5.1 -> 5.6 has an official recommendation of making sure the intermediate 5.5 update is performed too. Please review Section 2.11.1 while you make a backup of all your data. Yes, you do have to make a backup. When you run the upgrade, there are tables in the mysql scehma that will be tweaked and skipping a step can make for a very messy late night in an attempt to recover.

An other thing to look for is that on occasion new reserved words are introduced that may conflict with column names in use in your schemas. So it pays to read through the release notes for new reserved words and then run a quick grep on your tables to be safe. If you find that there is a new reserved word doing duty as one of your column name, you can either put the reference in single quotes or rename. This has not been a Drupal problem for quite a while but you need to be aware it can happen.

Software upgrades are like a good spaghetti meal -- have lots of sauce and do not under cook the noodles.

Software upgrades are like a good spaghetti meal — have lots of sauce and do not under cook the noodles.

CentOS uses RPM as their package manager and it usually wants to manage one version of a program. So we could run the MySQL 5.5 upgrade with rpm -u and then do the same for the 5.6 RPMs. But often RPMs are like the a game of Jenga where too many blocks are dependent on other blocks and you end up not being able to move with out knocking over the entire stack. I found a great How to upgrade MySQL 5.5 to MySQL 5.6 on CentOS 6.3/Red-hat/Fedora blog that covers the following in a little more detail but the gist of it follows.

The approach in the link above uses the Remi repositories which requires a little setup.
rpm -Uvh

rpm -Uhv

yum --enablerepo=remi,remi-test install mysql mysql-server

Restart the mysqld, run mysql_update, and double check your Drupal site. Your should be running Drupal7.22 on top of MySQL 5.5.

MySQL 5.6 is not in the Remi repositories so the upgrade this time is a little more involved. Read through How to upgrade MySQL 5.5 to MySQL 5.6 on CentOS 6.3/Red-hat/Fedora and keep in mid this also works for Centos 6.4 too. First grab the RPMS from the MySQL site.




Next, stop MySQL. Then remove MySQL 5.5.

yum remove mysql-server-5.5.31-1.el6.remi.x86_64 mysql-libs-5.5.31-1.el6.remi.x86_64 mysql-devel-5.5.31-1.el6-remi.x86_64

Install MySQL 5.6!

rpm -ivh MySQL-shared-5.6.11-2.el6.x86_64.rpm MySQL-client-5.6.11-2.el6.x86_64.rpm MySQL-server-5.6.10-1.el6.x86_64.rpm

Hey, great, we’re finished, right? Well, no. MySQL 5.6 is a much more secure at installation time and provides a random password for root. So restart mysqld again and use your new, super-secret password from /root/.mysql_secret to login as root. Use SET PASSWORD to reset the root password, test it a few times, and then remove the super-secret password file. Run mysql_upgrade to convert any remenents of older MySQL versions to the current version.

Finally, we have Drupal-7.22 running on a Centos 6.4 using MySQL 5.6! Whew!


One Response to Keeping your Drupal from Drooping — part 2

  1. […] He’s also the writer of the Keeping your Drupal from Drooping series, so read part 1 & part 2. I reckon that I’ll blog more about Drupal & MariaDB soon as […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: