MariaDB and MySQL share a common heritage, but they've diverged significantly since the 2009 fork. Understanding their differences helps you make the right choice for your project.
A Brief History
When Oracle acquired Sun Microsystems (and MySQL) in 2010, MySQL's original developers created MariaDB as a community-driven fork. The goal: ensure MySQL remains truly open source.
Key timeline:
- 2009: MariaDB forked from MySQL 5.1
- 2010: Oracle completes Sun acquisition
- 2012: MariaDB 5.5 (compatible with MySQL 5.5)
- 2017: MariaDB 10.2 diverges significantly from MySQL
- Today: MariaDB and MySQL are increasingly different products
Key Differences
Storage Engines
| Engine | MySQL | MariaDB |
|---|---|---|
| InnoDB | Yes (default) | Yes (default) |
| Aria | No | Yes (crash-safe MyISAM replacement) |
| ColumnStore | No | Yes (analytics) |
| MyRocks | Plugin | Built-in |
| Spider | No | Yes (sharding) |
Features Unique to MariaDB
- Sequences: Oracle-style sequence objects
- Invisible columns: Columns hidden from SELECT *
- System-versioned tables: Built-in temporal tables
- Oracle compatibility mode: PL/SQL-like syntax support
- Thread pool: Included in community edition (MySQL: Enterprise only)
Features Unique to MySQL
- MySQL Shell: Advanced administration tool
- Clone plugin: Physical replication for InnoDB
- Group Replication: Multi-primary clustering
- MySQL Router: Built-in connection routing
- Better JSON support: More JSON functions and indexing options
Compatibility Considerations
What's Compatible
- Basic SQL syntax
- Most client libraries and connectors
- Common frameworks (Laravel, Rails, Django)
- Standard data types
- Basic replication
Where They Diverge
| Area | Compatibility | Notes |
|---|---|---|
| JSON functions | Partial | Different function names and behavior |
| Window functions | Good | Both support, minor differences |
| CTEs | Good | MariaDB added earlier |
| Authentication plugins | Different | Default auth methods differ |
| Replication | Partial | GTID formats incompatible |
| System tables | Different | Information schema varies |
Migration Challenges
Moving between MySQL and MariaDB isn't always seamless:
-- This works in MySQL 8 but not MariaDB
CREATE TABLE t1 (
data JSON,
INDEX idx ((CAST(data->>'$.name' AS CHAR(50))))
);
-- MariaDB uses different syntax
CREATE TABLE t1 (
data JSON,
name VARCHAR(50) AS (JSON_VALUE(data, '$.name')),
INDEX idx (name)
);
Performance Comparison
Both databases perform well, with different strengths:
| Workload | Better Choice | Reason |
|---|---|---|
| General OLTP | Tie | Both excellent with InnoDB |
| High concurrency | MariaDB | Thread pool in community edition |
| JSON-heavy | MySQL | Better JSON optimization |
| Analytics | MariaDB | ColumnStore engine |
| Write-heavy | MariaDB | MyRocks engine option |
Licensing
MySQL
- Community Edition: GPL v2
- Enterprise Edition: Commercial (includes extra features, support)
MariaDB
- Community Server: GPL v2
- Enterprise: Commercial (BSL for some components)
For most users, both community editions are sufficient. MariaDB includes more features in its free version.
Ecosystem and Support
MySQL Advantages
- Larger market share and community
- More third-party tools assume MySQL
- Better cloud provider support (AWS RDS, Google Cloud SQL)
- Extensive Oracle documentation and support
MariaDB Advantages
- More transparent development process
- Faster release of new features
- Growing adoption (default on many Linux distros)
- Community-driven roadmap
When to Choose MySQL
- Enterprise support needed: Oracle support contracts available
- JSON-heavy applications: Better JSON performance and functions
- Existing MySQL infrastructure: Migration complexity not worth it
- Group Replication needed: Native multi-primary clustering
- Maximum compatibility: Most tools and frameworks assume MySQL
When to Choose MariaDB
- Open source commitment: Prefer community-driven development
- Thread pool without Enterprise: High-concurrency workloads
- Oracle migration: Better Oracle compatibility mode
- Analytics workloads: ColumnStore for data warehousing
- Linux default: Already using MariaDB on your servers
Both on DanubeData
We support both MySQL and MariaDB, so you can choose based on your needs:
- MySQL 8.0: Latest stable with full feature set
- MariaDB 10.11: LTS release with extended support
- Easy migration: Test both on our platform
- Same management: Identical dashboard experience
Making the Decision
For new projects:
- If you don't have a strong preference, MySQL offers maximum compatibility
- If you value open source principles or need thread pooling, choose MariaDB
For existing projects:
- Stick with what you have unless you have a specific reason to migrate
- Test thoroughly before any migration—subtle incompatibilities exist
Ready to deploy? Get started with MySQL or MariaDB on DanubeData.