Test and production servers are both upgraded from MySQL 5.5.29 to MariaDB 5.5.29

  Follow me: Follow Bruce Kirkpatrick by email subscription Bruce Kirkpatrick on Twitter Bruce Kirkpatrick on Facebook
Mon, Feb 04, 2013 at 7:25PM

After testing the sites and testing the linux upgrade steps on my test server with MariaDB 5.5.29, I was ready to go live with MariaDB in production.

I was able to migrate from mysql to mariadb fairly quickly.  I did make a couple mistakes however.

The my.cnf file gets renamed to my.cnf.rpmsave during installation.  I had to shut down mysql, rename the files and then start it again.

I also had something that checks the mysql's server-id in my code, which I had to fix.

So there was about 10 minutes of downtime during the migration.

I don't have any cool data to show about how it is faster / slower, etc.  I'm just going to have faith that it is giving us some benefits, and I look forward to using the SphinxSE integration soon for faster fulltext searching.

Here are my installation notes for Centos 6.3.  You'll need to have the remi repository installed prior to installation.  I had installed MySQL 5.5 with the remi repo previously, but you also need it for the compat-mysql55 package.

setup the repo and add enabled=1 to the repo file on a separate line.
rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
service mysqld stop
yum remove mysql-server mysql-libs mysql-devel mysql*
yum --enablerepo=remi-test --disablerepo=remi install compat-mysql55
yum install MariaDB* php-mysql postfix sysstat crontabs cronie-anacron cronie --exclude=MariaDB-test
chkconfig --levels 235 mysql on
service mysql start
mysql_upgrade -u root -p  (Press enter and enter your password to upgrade the system database tables)
service mysql restart (to make the system table upgrade take effect)

Everything should be working as before!

Notice that the init script is called "mysqld" on the mysql release, but its now "mysql" on the MariaDB release.

Please ensure you test this in your environment prior to going live.  It's also wise to make a backup of your database prior to doing a transition like this.  If you are coming from an older version of mysql, I recommend you upgrade and test your application on the newer version of mysql prior to switching to MariaDB to keep things simpler.


Bookmark & Share



Popular tags on this blog

Performance |