Skip to content
Navigation

Type at least two characters. Search covers page titles, headings, tags and database names.

↑ ↓ to navigateEnter to openEsc to close0 pages
MariaDBintermediate

Differences from MySQL

The concrete divergences between MariaDB and MySQL that affect replication, tooling, SQL and operations.

2 min readIntermediateUpdated Edit this page

The two engines share a dialect and an ancestry. The differences that matter are operational rather than syntactic.

Replication

AspectMySQL 8.0MariaDB
GTID formatsource_uuid:transaction_iddomain_id-server_id-sequence
Cross-replicationNot supported to MariaDBNot supported to MySQL
Multi-sourceSupportedSupported, with different syntax
Synchronous clusteringGroup ReplicationGalera, built in

Data dictionary

MySQL 8.0 replaced the file-based dictionary with a transactional data dictionary stored in InnoDB. MariaDB kept .frm files for longer and evolved differently. The practical consequences:

  • The data directories are not interchangeable.
  • information_schema contents differ in places, which is what breaks monitoring queries and schema-diff tools.

JSON

MySQL stores JSON in a binary format with its own type. MariaDB's JSON is an alias for LONGTEXT with a validation constraint. Most common functions exist on both, but performance characteristics and some function semantics differ. Queries that rely on MySQL's binary JSON internals — including multi-valued indexes on JSON arrays — do not transfer.

Authentication

MySQL 8.0 defaults to caching_sha2_password; MariaDB uses mysql_native_password and its own ed25519 plugin. Client libraries and connection strings often need adjusting when moving between them.

Optimiser

Both have cost-based optimisers with different feature sets — histogram implementations, join strategies and hint syntax all differ. A query tuned on one engine may need a different index or hint on the other. Re-verify plans after a migration rather than assuming they carry over.

Storage engines

MariaDB ships Aria, ColumnStore, Spider and MyRocks in addition to InnoDB. MySQL ships InnoDB as the only realistic choice for transactional work. See Storage Engines.

Features unique to each

MariaDB only: Galera in the distribution, system-versioned (temporal) tables, sequences as first-class objects, RETURNING on INSERT and DELETE, virtual columns with wider support.

MySQL only: the transactional data dictionary, Group Replication and InnoDB Cluster, multi-valued indexes on JSON arrays, and several 8.0 optimiser features.

Practical guidance

Choose one and standardise. The cost of the differences is not in writing SQL — it is in tooling, runbooks, monitoring queries and the expertise of whoever is on call. Running both means maintaining two of each.