Since their separation six years ago, the edge in the MariaDB vs MySQL competition has shifted towards MariaDB. Amazon cloud users might end up the big winners.

MariaDB was created as a fork of the MySQL database after MySQL was acquired by Oracle in 2008. MariaDB is a drop in, fully backward-compatible replacement for MySQL that actually offers more DB engines than MySQL itself. In fact, MariaDB has moved beyond MySQL with faster bug fixes, rapid feature enhancements, and support for NoSQL solutions like Cassandra and LevelDB.

Since the fork, many significant MySQL users – including Wikipedia, Suse, and Google – have migrated MySQL deployments to MariaDB for the better support, vibrant community, and open-source commitment. Nevertheless, when it comes to open source, efficient, and easy-to-use SQL databases, MySQL is probably still the first name that comes to mind.

Five advantages of MariaDB vs MySQL

You may want to more fully compare MariaDB vs MySQL compatibility, features, and upgrade paths. In the meantime, here are some more obvious advantages of MariaDB:

1. MariaDB vs MySQL: MariaDB is more reliably open source

MariaDB releases all of its code under GPL, LGPL, or BSD licenses. Unlike MySQL EE, MariaDB does not have closed source modules. With Oracle’s ownership of MySQL – and its unclear development and business model – MariaDB’s popularity is growing.

2. MariaDB vs MySQL: MariaDB supports many more engines

In addition to all the default MySQL engines, MariaDB supports more engines, including  XtraDB, (a drop in replacement for InnoDB), the Connect and Cassandra engines for NoSQL, and Spider for sharing.

3. MariaDB vs MySQL: MariaDB has more features

Parallel Replication, Thread pooling, Multi-source replication, Dynamic Columns, and engine-independent table statistics are some areas where MariaDB has passed MySQL 5.6. You can read the full list of new features here.

4. Active-active clustering

Unlike traditional master-slave replication, Galera Cluster supports master-master replication. Galera Cluster is shipped with MariaDB 10.1, so there is no need to add a separate cluster version.

5. Virtual Column support (Cassandra Storage Engine)

The Cassandra Storage Engine allows access to data in a Cassandra cluster from MariaDB. The primary goal of Cassandra SE (Storage Engine) is data integration between the SQL DB and NoSQL data-store. Cassandra SE makes Cassandra’s column family appear as a table in MariaDB. Users can select, insert, update, and write joins against this table.

MariaDB vs MySQL and AWS

Since October 2015, Amazon RDS (Relational Database Service) supports MariaDB version 10.0.17 community edition, across all regions except US Gov. Amazon RDS also supports the XtraDB and Aria storage engines for MariaDB instances. RDS’s Point-In-Time Restore and Snapshot Restore require a recoverable storage engine, and are supported for the XtraDB engine only. The Aria storage engine is used for spatial indexes to handle geographical data, but are not recommended for general use.

Like other RDS databases, MariaDB is protected by AWS security features like VPCs and DB Security Groups. Just like RDS for MySQL, user privileges are handled by IAM. You can modify DB Instance settings like DB instance class, Multi-AZ deployment, allocated storage, storage-type, master password, security group, and retention period. MariaDB usually performs a cache warming for better performance. However in AWS, if you choose Provisioned IOPS storage, cache warming is not required.

As of the current release (10.0.17), Amazon RDS does not support the following MariaDB features:

  • MariaDB Galera Cluster
  • HandlerSocket
  • Multi-source Replication
  • Storage engine-specific object attributes, as described in Engine-defined New Table/Field/Index
  • Attributes

Setting Up MariaDB on RDS:

Let’s see how we can set up MariaDB through the AWS Management Console.

  • Select MariaDB Community Edition as your database:

MariaDB vs MySQL

  • Specify your usage profile:

MariaDB vs MySQL

  • Specify DB details:

MariaDB vs MySQL

  • Set advanced settings like Network and Security, Database Options, Backup and, on the next page, Maintenance Window:

MariaDB vs MySQL

  • Click “Launch DB Instance”.

You can also set up MariaDB using the AWS CLI. The following syntax (and its optional arguments) will launch MariaDB on RDS:

MariaDB and Amazon EC2:

Of course, there’s nothing stopping you from setting up MariaDB yourself on an Amazon EC2 instance. You will need to import a MariaDB Signing Key:

…and then create a file “MariaDB.repo” in /etc/yum.repos.d/

You install MariaDB server and client using:

To start the service, run:

You can also choose from a number of MariaDB AMIs in the AWS Marketplace. The AMI images are documented here.

MariaDB vs MySQL: conclusion

MariaDB support from AWS has been long expected. With this new release, Amazon expanded its RDS portfolio in a significant way. Though there is only one version that’s supported so far, that could change in the coming months. Being one of the world’s most popular databases, MariaDB on AWS adds opportunities for Amazon and its many users.

Interested in learning more about databases on AWS? Try Cloud Academy’s hands-on Amazon RDS lab or our AWS Database Fundamentals course.