Skip to content
BeoHosting
BeoHosting
Technical

What Is MariaDB and Why It Is Popular

BeoHosting Team··9 min read read
What Is MariaDB and Why It Is Popular

Intro to MariaDB

MariaDB is an open-source relational database that emerged in 2009 as a fork of MySQL. It was created by Michael "Monty" Widenius, the original creator of MySQL, after Oracle acquired Sun Microsystems (the owner of MySQL). Monty was concerned that Oracle could change the MySQL licensing model or slow development, so he started MariaDB as a community-driven alternative that guarantees it will remain free and open-source.

Since then, MariaDB has grown from a simple fork into a standalone database with numerous improvements. It's used by giants like Google, Wikipedia, the Mozilla Foundation, and Deutsche Telekom. Most Linux distributions (Fedora, Red Hat, Debian, Ubuntu, Arch Linux) have replaced MySQL with MariaDB as the default database. In the hosting industry, MariaDB has become the standard on leading hosting panels and Plesk servers.

MariaDB vs MySQL - key differences

Compatibility

MariaDB is designed as a "drop-in replacement" for MySQL - applications using MySQL can migrate to MariaDB without code changes. MariaDB uses the same client protocols, the same SQL commands, the same configuration files, and the same management tools (the mysql command-line client, mysqldump for backup). Up to version 10.5, MariaDB maintained complete binary compatibility with MySQL. Since newer versions, there are some differences in advanced features, but for 99% of web applications (including WordPress) compatibility is complete.

Storage engines

MariaDB supports all MySQL storage engines plus additional ones. Aria is MariaDB's improved MyISAM engine with crash recovery support - if the server crashes, Aria tables automatically recover without needing repair. ColumnStore is an engine optimized for analytical queries on large data sets (OLAP). Spider enables distributed tables across multiple servers. MyRocks (based on Facebook's RocksDB) offers better compression and write performance for SSD disks. InnoDB remains the default engine in MariaDB too, but with additional optimizations.

Performance

MariaDB generally shows better performance than MySQL in most scenarios. Thread pool (free in MariaDB, paid in MySQL Enterprise) significantly improves performance under high load by more efficiently managing a large number of simultaneous connections. The query optimizer in MariaDB uses more advanced strategies for JOIN operations, subqueries, and tables with multiple indexes. MariaDB's InnoDB has improvements in buffer pool management and log writing that result in faster write operations.

Licensing

MariaDB uses the GPLv2 license and the MariaDB Foundation guarantees it will always remain open-source. MySQL has dual licensing - Community Edition is GPLv2, but Enterprise Edition with advanced features is commercial. Some features that are free in MariaDB (thread pool, audit plugin, encryption at rest) are available only in the paid MySQL Enterprise version. For companies that want a guarantee of open-source database status, MariaDB is a safer choice.

Advanced MariaDB features

Encryption at rest

MariaDB supports transparent data encryption at rest for free, while this feature in MySQL is only available in the Enterprise version. Encryption covers tablespace files (InnoDB), log files (redo log, undo log), and the binary log. This matters for GDPR compliance and other regulations that require protection of data at rest. Configuration requires only setting up a key management plugin and enabling encryption in the configuration.

Galera Cluster

MariaDB Galera Cluster is a synchronous multi-master replication system that allows reads and writes on any node in the cluster. All nodes have identical data at any time, which eliminates the problem of replication lag. Galera automatically detects a node failure and redirects traffic to remaining nodes. This is ideal for applications that require high availability and outage resilience without compromising data consistency.

Temporal Tables

MariaDB supports System-Versioned Tables (temporal tables) that automatically store the history of all changes to a table. Each row has a validity period and you can query the database for "how the data looked at any moment in the past". This is extremely useful for audit trails, compliance requirements, data debugging, and undo functionality. Instead of implementing triggers and history tables yourself, MariaDB does it transparently at the engine level.

JSON support

MariaDB supports the JSON data type and functions for working with JSON documents. Although MySQL also has JSON support, MariaDB's approach is different - in MariaDB, JSON is an alias for LONGTEXT with JSON validation, while MySQL uses a binary format. For most web applications the difference is negligible, but MariaDB's approach simplifies compatibility with tools that expect a text format. JSON functions (JSON_EXTRACT, JSON_SET, JSON_ARRAY) are available in both databases.

MariaDB and WordPress

Full compatibility

WordPress officially supports MariaDB since version 10.1 (WordPress.org requirements page). In practice, WordPress runs on MariaDB as reliably as on MySQL because it uses standard SQL operations that are identical in both databases. WooCommerce, BuddyPress, bbPress, and all popular plugins work without issues on MariaDB. Many WordPress hosting providers (including big players like SiteGround, Cloudways, and A2 Hosting) use MariaDB instead of MySQL.

Performance with WordPress

WordPress sites on MariaDB show better performance in several scenarios. Complex WP_Query queries with multiple meta_query conditions use MariaDB's optimizer that better handles subqueries. WooCommerce stores with a large number of products and variations benefit from better JOIN strategies. Sites with many concurrent users (members, forum, e-commerce) benefit from thread pool functionality that prevents connection exhaustion under load.

Recommended version

For WordPress sites, MariaDB 10.6 LTS (Long Term Support) or newer is recommended. LTS versions receive security updates for a minimum of 5 years, which is important for production sites. MariaDB 10.11 is the latest LTS version with performance and security improvements. Avoid non-LTS versions on production servers because they have a shorter support period.

Migrating from MySQL to MariaDB

The migration process

Migrating from MySQL to MariaDB is a simple process. Create a full MySQL database backup using mysqldump. Stop the MySQL service. Install MariaDB (on most Linux distributions: apt install mariadb-server or yum install mariadb-server). MariaDB installation automatically picks up the MySQL data directory and configuration. Run mysql_upgrade to update system tables. Start MariaDB and verify the application works normally. The entire process usually takes less than 30 minutes for a typical web server.

Potential issues

Migration is generally painless, but there are a few potential problems. If you use MySQL-specific features that MariaDB doesn't support (rare for web applications), code modification is needed. Differences in default configuration values may require adjusting the my.cnf file. MySQL 8.0 uses caching_sha2_password as the default authentication plugin, while MariaDB uses mysql_native_password - check client compatibility. Backup files created with MySQL 8.0 mysqldump may require minor changes before import into MariaDB.

Going back to MySQL

If for any reason you want to return to MySQL, the process is similar: mysqldump backup from MariaDB, MySQL installation, backup import. However, if you used MariaDB-specific features (Aria engine, temporal tables, specific SQL extensions), those features won't work on MySQL and modification is needed.

MariaDB optimization for web hosting

Key settings

For a web hosting server with WordPress sites, the most important settings are InnoDB buffer pool size (set to 50-70% of available RAM for a dedicated server, less for shared), max_connections (depends on the number of sites and traffic, typically 150-300), query_cache_type and query_cache_size (useful for WordPress but be mindful of invalidation overhead), tmp_table_size and max_heap_table_size (increase if you have many complex queries), and innodb_log_file_size (larger log files improve write performance but slow crash recovery).

Monitoring

Regular database monitoring helps identify problems before they affect users. MySQLTuner is a Perl script that analyzes the configuration and suggests optimizations. MariaDB Enterprise Monitor and the open-source alternative PMM (Percona Monitoring and Management) provide detailed metrics on query performance, resource usage, and replication. The SHOW GLOBAL STATUS and SHOW PROCESSLIST commands give insight into the current database state.

Common questions about MariaDB

  • Is MariaDB free? Yes, MariaDB Community Server is completely free and open-source (GPLv2). There's also MariaDB Enterprise with commercial support and additional tools.
  • Can I use phpMyAdmin with MariaDB? Yes, phpMyAdmin works identically with MariaDB as with MySQL. All operations (creating databases, import/export, user management) work the same.
  • Is MariaDB more secure than MySQL? MariaDB has some security features free (encryption at rest, audit plugin) that in MySQL are only available in the Enterprise version. Both databases are secure when properly configured.
  • Which hosting providers use MariaDB? SiteGround, Cloudways, A2 Hosting, InterServer, and most cPanel hosting providers use MariaDB. BeoHosting also uses MariaDB on all servers.
  • Does MariaDB support replication? Yes, MariaDB supports master-slave replication (compatible with MySQL), Galera Cluster for multi-master synchronous replication, and semi-synchronous replication.

Conclusion

MariaDB is a mature, stable, and performant database that has become the de facto standard in the hosting industry. Full compatibility with MySQL, free enterprise features, better performance under load, and a guarantee of open-source status make it an excellent choice for web applications of all sizes. On our hosting platform we use MariaDB on all servers because it provides the best ratio of performance, reliability, and security for WordPress and other web applications of our clients.

BeoHosting Team

10+ years of experience — Web hosting and infrastructure specialists

  • Web Hosting
  • WordPress Hosting
  • VPS
  • Dedicated Serveri
  • Domeni
  • SSL
  • cPanel
  • LiteSpeed
  • Linux administracija
  • DNS

Last updated: