MariaDB was created in 2009 by MySQL’s original developers, as a community fork after Oracle acquired MySQL. For years it was a near drop-in replacement. Since then the two have diverged — still compatible for most applications, but with real differences under the hood.
Quick comparison
| MySQL (8.0 / 8.4 LTS / 9.x) | MariaDB (10.11 / 11.x LTS) | |
|---|---|---|
| Owner | Oracle | MariaDB Foundation + MariaDB plc |
| License | GPL (community), commercial editions | GPL; all features open source |
| Default in | Ubuntu (mysql-server), Oracle Linux |
Debian, many other distributions |
| JSON | Native binary JSON type |
JSON is an alias for LONGTEXT with validation |
| Default auth | caching_sha2_password |
mysql_native_password / unix_socket (ed25519 available) |
| Thread pool | Enterprise edition only | Included |
| Storage engines | InnoDB (+ a few) | InnoDB, Aria, MyRocks, ColumnStore, Spider… |
| Clustering | Group Replication, InnoDB Cluster | Galera Cluster built in |
| System versioned tables | No | Yes (temporal tables) |
| Sequences | No | Yes (CREATE SEQUENCE) |
| Client binaries | mysql, mysqldump |
mariadb, mariadb-dump (old names still work as links) |
For applications: mostly interchangeable
WordPress, Drupal, Joomla, Nextcloud, Magento, Laravel and most PHP applications run on either. Typical SQL — tables, indexes, joins, transactions — behaves the same.
Where differences show up:
- JSON-heavy queries — MySQL’s binary JSON is faster for in-place operations and some functions differ.
- Authentication — clients and drivers expecting MySQL 8’s
caching_sha2_passwordvs MariaDB’s methods; modern drivers handle both. - Collations — MySQL 8 defaults to
utf8mb4_0900_ai_ci, which doesn’t exist in MariaDB. Dumps from MySQL 8 imported into MariaDB fail with “Unknown collation” until you replace it (e.g. withutf8mb4_unicode_ci). MariaDB 11.4+ added UCA 14 collations with different names. - Optimizer — the two optimizers evolved separately; a query can perform differently on each.
- Replication — GTID formats differ, so replicating between MySQL and MariaDB is limited.
Switching
MySQL 5.7 → MariaDB
Historically the easiest path: MariaDB 10.x could often take over a MySQL 5.7 data directory in place. Still, take a full dump first.
MySQL 8 → MariaDB
Not a drop-in replacement at the file level. Migrate logically:
mysqldump --single-transaction --routines --triggers --databases app > app.sql
sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' app.sql
mariadb < app.sql
Recreate users on the new server rather than copying the mysql system database.
MariaDB → MySQL 8
Also logical dump and restore. Check for MariaDB-only features (sequences, system-versioned tables, RETURNING, some JSON functions) in your schema and queries first.
Test the application against the target before switching production. See mysqldump backup and restore.
Performance
For typical web workloads the performance is similar; differences depend on workload and version. MariaDB includes a thread pool in the free version, helpful with very many concurrent connections. MySQL 8 has had substantial optimizer and replication improvements. Tuning, indexing and caching matter far more than which one you pick — see MySQL performance tuning, which applies to both.
Release cycles
- MySQL: 8.0 reached end of life in 2026; 8.4 is the current long-term support release, alongside “innovation” releases (9.x) with new features and short support windows.
- MariaDB: yearly LTS releases (10.6, 10.11, 11.4, …) with five years of support, plus short-term releases in between.
For servers, pick an LTS release of either and plan upgrades within its support window.
Which should you use?
- Debian server, WordPress or typical PHP app: MariaDB from the distribution repositories is the path of least resistance.
- Ubuntu server: either —
mysql-serverandmariadb-serverare both available. - Need MySQL-specific features (binary JSON performance, InnoDB Cluster, compatibility with a managed MySQL service you might move to): MySQL.
- Need Galera multi-primary clustering, temporal tables, or prefer fully open-source governance: MariaDB.
- Starting fresh with complex data needs: also consider PostgreSQL — see MySQL vs PostgreSQL.
Installation guides
- Install MySQL on Ubuntu
- Install MariaDB on Linux
- Reset a lost root password (works for both)
Both run well on any Linux VPS — pick the one your application and team know best.