RHEL7 & the transition from MySQL to MariaDB: A first look.

Red Hat Enterprise Linux 7 was declared GA on Tuesday, more than 3.5 years after the release of RHEL 6. A big piece of news with this release is that it includes MariaDB Server instead of Oracle MySQL as “the default implementation of MySQL in Red Hat Enterprise Linux 7”. What does this mean? When you need to install a “MySQL server”, the one included in the RHEL7 repositories, and the one officially supported by Red Hat, will be MariaDB. This is great news for the MariaDB team and a testament to the incredibly hard work they’ve done in the areas of security, stability, performance, and openness. But what does it mean for users of RHEL7? Let’s take a look. Here’s an overview of what packages we had to work with in RHEL6 and what we now have in RHEL7. RHEL6 had a number of packages related to MySQL:

mysql-bench.x86_64 : MySQL benchmark scripts and data
mysql-connector-odbc.x86_64 : ODBC driver for MySQL
mysql-devel.x86_64 : Files for development of MySQL applications
mysql-embedded-devel.x86_64 : Development files for MySQL as an embeddable
mysql-embedded.x86_64 : MySQL as an embeddable library
mysql-libs.x86_64 : The shared libraries required for MySQL clients
mysql-server.x86_64 : The MySQL server and related files
mysql-test.x86_64 : The test suite distributed with MySQL
mysql.x86_64 : MySQL client programs and shared libraries

And RHEL7 has these MariaDB packages instead:

mariadb-bench.x86_64 : MariaDB benchmark scripts and data
mariadb-devel.x86_64 : Files for development of MariaDB/MySQL applications
mariadb-libs.x86_64 : The shared libraries required for MariaDB/MySQL clients
mariadb-server.x86_64 : The MariaDB server and related files
mariadb-test.x86_64 : The test suite distributed with MariaD
mariadb.x86_64 : A community developed branch of MySQL

I’m not sure why Red Hat decided not to include the -embedded* packages in RHEL7, but I expect that those will be available from mariadb.org in short order. We can look at “MySQL” or any other DBMS from a couple different angles. One is to think about installing and managing the server (mysqld) and another is to think about interacting with an existing server using a client program. The typical workflow to install “MySQL Server” on RHEL has been to install the mysql-server package, but now you must install mariadb-server (or you can pull that in by installing or requiring mariadb-compat-server). Otherwise, the new MariaDB packages will feel very comfortable to anyone who is accustomed to the old MySQL packages included in Red Hat Enterprise Linux. However, there are a couple important changes. Note:

  • The error log is now found at /var/log/mariadb/mariadb.log instead of at /var/log/mysqld.log.
  • The system service is now called mariadb instead of mysql (i.e. you will use service start mariadb).

The data directory is still /var/lib/mysql by default, and the socket file still goes to /var/lib/mysql/mysql.sock. So that’s the server. If you’re creating a client program that interacts with MySQL/MariaDB and you build packages that require mysql-libs, those will continue working, since mariadb-libs provides the mysql-libs capability:

$ sudo repoquery --provides mariadb-libs.x86_64
config(mariadb-libs) = 1:5.5.37-1.el7_0
libmysqlclient.so.18()(64bit)
libmysqlclient.so.18(libmysqlclient_16)(64bit)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
mariadb-libs = 1:5.5.37-1.el7_0
mariadb-libs(x86-64) = 1:5.5.37-1.el7_0
mysql-libs = 1:5.5.37-1.el7_0
mysql-libs(x86-64) = 1:5.5.37-1.el7_0

Note, though, that the version of libmysqlclient has been incremented to libmysqlclient.so.18 from the libmysqlclient.so.16 that is included in RHEL6, so packages that are built against the old version of the client library may need to be rebuilt. I expect that a MariaDB-compat=]] RPM will be made available at mariadb.org when The MariaDB Foundation starts building and releasing RPMs for RHEL7. You can safely build your clients and require either mariadb-libs or mysql-libs and your clients will still be able to connect to Oracle MySQL, Percona Server, and MariaDB Server all without you needing to take any special steps. And that's the client. I expect mostly smooth sailing for people making the transition from Oracle MySQL to MariaDB Server. In most cases, people may not even notice that a change has happened, except that they might see better performance, have access to better diagnostic tools, and have access to great new features when they grow to need them. Take a look at What is MariaDB 5.5? for some more background on what makes MariaDB Server 5.5 special. I'm excited to see MariaDB getting wider recognition, and I'm looking forward to all of the amazing things people will be doing with it in Enterprise settings across the globe!