From Fedora Project Wiki

< Features

Revision as of 12:52, 11 February 2013 by Hhorak (talk | contribs) (Enhance steps in F19 with handling obsoletes option)

Replace MySQL with MariaDB


MariaDB, a community developed fork of MySQL, will be the default implementation of MySQL in Fedora 19.


Current status

  • Targeted release: Fedora 19
  • Last updated: 2013-01-31
  • Percentage of completion: 95%

Detailed Description

MariaDB is a fork of the MySQL database project that provides a drop-in replacement for MySQL. It preserves API/ABI compatibility with MySQL and adds some new features.

The original company behind MySQL, MySQL AB, were bought out by Sun which was then bought by Oracle. Recent changes made by Oracle indicate they are moving the MySQL project to be more closed. They are no longer publishing any useful information about security issues (CVEs), and they are not providing complete regression tests any more, and a very large fraction of the mysql bug database is now not public.

MariaDB, which was founded by some of the original MySQL developers, has a more open-source attitude and an active community. We have found them to be much easier to work with, especially in regards to security matters.

We would like to replace MySQL with MariaDB in early development cycle for Fedora 19. MySQL will continue to be available for at least one release, but MariaDB will become the default. Also, we do not intend to support concurrent installation of both packages on the same machine; pick one or the other.

Benefit to Fedora

Fedora will have a truly open-source MySQL implementation and won't depend on what Oracle decides to do with MySQL in the future. Compared to MySQL, MariaDB is faster in some cases, it includes some new engines and features, while the existing engines and features are enhanced and still compatible.


MariaDB is binary compatible with MySQL of the same major version, so we don't need to change anything in packages depending on (We will be replacing mysql 5.5 with mariadb 5.5, so there are no cross-major-version changes to worry about.)

However, the embedded-mysql library has changed soname, because we had to create this library manually before, while MariaDB supports it out-of-the-box now. As a consequence, packages depending on the mysql-embedded package will have to be rebuilt (currently only amarok).

Admins shouldn't notice any change.

How To Test

We need to test switching from MySQL to MariaDB on some large production databases. We will have some larger database and MySQL will be running. At this point updating to MariaDB will be done and should process cleanly. After RPM update, database will be checked from database POV and users POV. Dump of the database should be the same and users shouldn't notice any change. We will need to test also connectors and applications using mysql client library.

User Experience


  • There are no end-user visible changes, except the database being faster and more reliable.


  • Packages structure and their contents are similar to MySQL and the changes are usually just some new files.


  • Dependencies are unchanged from MySQL.

Contingency Plan

Switching back to MySQL if necessary should be easy.

We intend to mark the mariadb packages as providing/obsoleting mysql. In event that mariadb is not accepted as default, we'd just remove these markings. It will also be necessary to adjust (or revert) anaconda's idea of the packages to install when asked for a mysql database.


Main differences between MariaDB and MySQL are listed in

Compatibility between MariaDB and MySQL is discussed in

Package Review is available in

Some related discussions took place on fedora-devel-list:

Steps to replace MySQL with the new MariaDB for testing purposes in Fedora 17 and 18

In Fedora 17 and 18, there are packages of MariaDB, which don't obsolete MySQL, so they won't be installed if user doesn't request them explicitly. Suppose we have the following packages installed: mysql, mysql-libs, mysql-devel, mysql-server; and we want to replace them with the same set of MariaDB packages.

Note: Structure and content of MariaDB packages are the same as MySQL packages, so you don't have to think about what packages you need, just install the same set as of packages as you have from MySQL.

1) backup your data e.g. using mysql_dump just for the case something goes wrong; usually this backup won't be needed

2) remove MySQL packages and install MariaDB packages in one transaction:

# yum shell
> remove mysql mysql-libs mysql-devel mysql-server
> install mariadb mariadb-libs mariadb-devel mariadb-server
> run

If you'll need to go back to MySQL again in the future, just prepeat the steps above with swapping MySQL packages with MariaDB and vise versa.

Steps to replace MariaDB with the original MySQL in Fedora 19 (rawhide)

In Fedora 19, MariaDB packages obsoletes MySQL. That means that all packages of MySQL will be automatically replaced by corresponding MariaDB pacakges during update. The steps bellow describe procedure to get back to original MySQL packages.

Suppose the following packages are installed: mariadb, mariadb-libs, mariadb-devel, mariadb-server; and we want to replace them with the same set of MySQL packages.

1) backup your data e.g. using mysql_dump just for the case something goes wrong; usually this backup won't be needed

2) let yum know that you want to ignore MariaDB packages by adding the following line into the particular repository or /etc/yum.conf in case you want to ignore them in all repositories:


In case of fedora-rawhide.repo it will look like that:

name=Fedora - Rawhide - Developmental packages for the next Fedora release

3) then we need to disable checking obsolete packages in /etc/yum.conf, because already installed MariaDB packages obsolete all MySQL packages in the repository:


4) remove MariaDB packages and install MySQL packages in one transaction

# yum shell
> remove mariadb mariadb-libs mariadb-devel mariadb-server
> install mysql mysql-libs mysql-devel mysql-server
> run

5) set obsoletes option in /etc/yum.conf back to original value (1 by default)

Release Notes

MariaDB, an improved and more open fork of the MySQL database project, has replaced original MySQL as the default mysql-compatible database. This change should be transparent to almost all MySQL users. However, if you encounter difficulties, you can replace MariaDB with the original mysql packages. (TODO: specify package names to install/remove to do this.)

Comments and Discussion