SSL Connection Vulnerability of MySQL and MariaDB: Find out more
kolbekegel

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!

About the Author

kolbekegel's picture

Kolbe Kegel is a Principal Support Engineer. Kolbe has worked with MySQL since 2005, first at MySQL, later at Sun Microsystems after its acquisition of MySQL Inc., then at Oracle after its acquisition of Sun.

hhorak

Hi, thanks for the article for the first place. I'd like to make more clear some statements though: As for "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." -- the mariadb-embedded and mariadb-embedded-devel packages indeed are included in RHEL-7, but only in "Optional" channel. The name of the alternate name is actually mysql-compat-server, not mariadb-compat-server. This symbol could be used if somebody simply does not care which implementation actually provides the MySQL-compatible server, whether it is MariaDB or MySQL or Percona or any other fork. Hopefully this symbol will be provided soon in RPMs by all of the biggest players. Let me also take a note that MariaDB 5.5 is available as a Software Collections package (files under /opt/rh) for both, RHEL-7 and RHEL-6. Thanks and keep doing great job, guys! Honza (RHEL-7 MariaDB maintainer)
kolbekegel

Hello Honza. Thanks for your comments can clarifications! My use of "mariadb-compat-server" was a typo and it is indeed "mysql-compat-server". Thank you for that. It's also good to know about the additional capabilities available with the "Optionals" and "Software Collections" features. Kolbe
simonmudd

RedHat provide on their new release a version of MariaDB which is not the latest Ga version. It would have been much nicer to have seen 10.0 which contains significant enhancements vs 5.5. This will only tempt some people to download 10.0 from your site, or to look for MySQL 5.6 from Oracle's, both of which if you care about performance or features is likely to be a better choice. Now 7 is GA it's unlikely this can be changed which is unfortunate as I have seen people using the default RH package on CentOS6 which is an antiquated 5.0.68 iirc. So we repeat the same story..
john_moylan_l

@simonudd RHEL6 has 5.1.73 and not 5.0.68, 5.0 shipped with RHEL5

Newsletter Signup

Subscribe to get MariaDB tips, tricks and news updates in your inbox: