Tutorial

Switching to MariaDB from MySQL

Published on July 18, 2013
Switching to MariaDB from MySQL

Intro

Arch Linux has recently made MariaDB their default implementation of MySQL in their distribution and has recommend that all users upgrade to it. In April, Wikipedia announced that they had switched their English and German wikipedias to run on MariaDB. Fedora 19 has MariaDB as their default SQL database.

About MariaDB

MariaDB is an open source fork of MySQL developed and worked on by the original MySQL developers, lead by Michael “Monty” Widenius. It was created and embraced by the open source community as an effective alternative to MySQL. Although MySQL is still an open source project, it is owned by Oracle, purveyors of their own enterprise software. Worries about the progress of MySQL as well as the status of MySQL as an open source project have prompted the migration to MariaDB. A bug snafu that removed the GPL license from MySQL’s man page caused additional consternation in the open source community as it seemed to restrict the replication of the man pages. Oracle quickly reported this issue as a bug and corrected the copyright notice. Nonetheless, this event was another reminder of how quickly corporate policies could affect the MySQL community.

When summarizing Wikipedia’s move to MariaDB, the announcer Asher Feldman, included a hint as to why he switched: “…as supporters of the free culture movement, the Wikimedia Foundation strongly prefers free software projects; that includes a preference for projects without bifurcated code bases between differently licensed free and enterprise editions.” Oracle’s different treatment of the enterprise and community versions is another factor that caused a stir. At this point, the future of MySQL, subject to decisions of Oracle, remains murky.

Moving to MariaDB

Moving to MariaDB is made to be simple. The database is a drop in replacement for Mysql, launching with the same commands.

In order to upgrade, the user can simply

No further steps are necessary. Once MySQL is off the server and MariaDB is in its place, you can manage your data just as you did before:

Databases, content, and information should carry over between the two programs even without a MySQL dump being performed. Starting up, and using MariaDB requires all of the same commands as MySQL—once Maria is installed, no further changes need to be made.

MariaDB’s Version Numbers

As MariaDB works to be as similar as possible (barring any improvements made to the code on MariaDB’s side) to MySQL, its version numbers used to correlate directly with MySQL’s. To this effect, MariaDB 5.5 had all of the features of MySQL 5.5, as well some of the original ones that improved upon MySQL’s functionality.

However, as MariaDB continues to build out its own features and divest from MySQL, MariaDB version names are taking on a new convention. With the differing schedules of MySQL and MariaDB feature releases, MariaDB’s latest version is 10.0.

A Note for DigitalOcean

Within the DigitalOcean collection of articles, we currently have a lot of pieces focused on MySQL. However, since the growth of MariaDB, we do recommend using MariaDB in the place of MySQL. The instructions within the articles should remain unchanged.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about us


About the authors

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
5 Comments


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Just one note: you do NOT need uninstall MySQL from your server. Your existing MySQL installation will be automatically upgraded to MariaDB.

Can i use MARIADB10.1 for my wordpress blog previously using mysql 5.5?

I am having Master-Master replication in production using MySQL. Can I upgrade one of the primary node to MariaDB directly, without affecting the cluster?

CentOS 7 comes with MariaDB instead of MySQL. So if you do “yum install mysql” it will install MariaDB. Also you don’t need to do much switching to MariaDB however when you install the mysql2 gem do this:

This was tested in CentOS 7 and Debain 7 with MariaDB. First install the necessary MariaDB so you get “mysql_config” file. Look for “devel” and “common” at the end.

For bundle

bundle config build.mysql --with-mysql-config=/usr/bin/mysql_config

OR just to install the gem

gem install mysql --with-mysql-config=/usr/bin/mysql_config

Thank you for this tutorial.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel