MySQL vs MariaDB: what actually differs
MariaDB started as a fork of MySQL and still speaks the same client protocol, but GTIDs, JSON storage, authentication and tooling have diverged. Here is what the vendors document.
Drafted with AI from official documentation. Scripts were run in a test environment and repository links verified. Awaiting a human check. Did it work for you? Last edited Outdated?
MariaDB began as a fork of MySQL led by original MySQL developers. For years each MariaDB release was close to a “drop-in replacement” for the matching MySQL version. That is no longer true in general: since MariaDB 10.x and MySQL 8.x the two have added different features and changed different defaults. This page sticks to differences that the MariaDB and MySQL documentation state.
What stays compatible
- The client protocol: MariaDB’s documentation says its client protocol is binary compatible with MySQL’s, and MySQL connectors work with MariaDB.
- Core SQL and the account model (
'user'@'host',CREATE USER,GRANT). - Configuration files: MariaDB’s server reads
my.cnf, including[mysqld]sections, and additionally[mariadb]sections. - Tools by name: MariaDB renamed its binaries to
mariadb,mariadb-dumpand so on, and keeps themysql*names as symlinks.
Documented differences
MariaDB publishes a per-version list. The points below come from its comparison of MariaDB 11.8 with MySQL 8.0; check the page for your exact versions.
- GTIDs: MariaDB’s global transaction IDs are not compatible with MySQL’s, and the GTID system variables differ. A replication setup cannot mix them freely, and MariaDB states it cannot replicate from a MySQL 8.0 primary because of binary log format differences.
- JSON: in MariaDB,
JSONis an alias forLONGTEXTand values are stored as text; MySQL stores JSON in a binary format. Comparisons and some operators behave differently. - Authentication: MariaDB cannot use accounts created with MySQL’s SHA-256 password algorithm, and on Unix-like systems
root@localhoston a fresh install usesunix_socket(log in withsudo mariadb). MySQL 8.4 defaults tocaching_sha2_password. - Storage engines: MariaDB includes engines MySQL does not, such as Aria, ColumnStore, MyRocks, S3 and Spider. Both use InnoDB as the main transactional engine.
- Server initialization: MariaDB does not support
mysqld --initialize; it usesmariadb-install-db. - X Protocol: MariaDB does not support MySQL’s X Plugin.
- Performance Schema: disabled by default in MariaDB, enabled by default in MySQL.
- Option names: MariaDB accepts unique prefixes of option names (with a warning); MySQL requires full names.
- SET PERSIST exists in MySQL but is not supported in MariaDB.
Moving data between them
Because on-disk formats and system tables have diverged, the safest way to move a database between MySQL and MariaDB is a logical dump and reload, not copying the data directory. Dump only application databases and recreate accounts with CREATE USER/GRANT statements on the target.
# on the MySQL host
mysqldump -u root -p --single-transaction --routines --events --triggers \
--databases shop > shop.sql
# on the MariaDB host
mariadb -u root -p < shop.sql
Test the application against the target before switching: look especially at JSON columns, SQL that relies on version-specific functions, and connection settings that name an authentication plugin.
Which one should I pick?
Pick the one your distribution, hosting platform or application vendor supports best, then stay consistent across environments. Mixing them inside one replication topology or between test and production is where most surprises come from. Version numbers no longer line up: MariaDB 11.x is not “MySQL 11”.
Official documentation
Did this work for you?
No votes yet. Be the first.
If it did not work, the report form below tells the editors what went wrong.
See also
- 0214 MySQL users and privileges: CREATE USER, GRANT and authentication plugins A MySQL account is a user name plus the host it connects from. You create it with CREATE USER, give it rights… Beginner · Step by step · Linux Article Administration · Security & access 15 Oct 2026
- 0215 mysql command-line client cheat sheet The connection options, built-in commands and everyday SQL you need in the mysql (and mariadb) command-line client, on one page. Beginner · Cheat sheet · Any system Article Administration · Queries 15 Oct 2026
- 0217 MySQL binary logs and point-in-time recovery The binary log records every change after your last backup. Restore the backup, then replay the binary log up to just before… Advanced · Explains an idea · Linux Article Backup & restore · Replication 15 Oct 2026
- 0218 Setting up MySQL source-replica replication with GTIDs Step by step: configure a MySQL 8.4 source and replica with GTIDs, create the replication account, copy the data, connect the replica… Advanced · Step by step · Linux Article Administration · Replication 15 Oct 2026
- 0219 mysqldump nightly backup with rotation (bash) A cron-ready bash script that dumps each MySQL or MariaDB database to its own compressed file with --single-transaction, verifies it and deletes… Intermediate · Step by step · Linux Script Administration · Backup & restore 15 Oct 2026
- 0220 Fix: ERROR 1045 (28000): Access denied for user ‘appuser’@’localhost’ (using password: YES) The server rejected the user, host and password combination. Usually it is a wrong password, a host part that does not match,… Beginner · Fixes an error · Linux Article Administration · Security & access 15 Oct 2026
Repos in the wild
- MySQL Server source code mysql/mysql-server Oracle's public GitHub repository with the source code of MySQL Server, including the server, client programs such as mysql and mysqldump, and the test suite. GitHub
- MariaDB Server MariaDB/server The source of MariaDB Server, the community-developed fork of MySQL started by original MySQL developers, licensed under GPLv2. GitHub
History
Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.
- Dominik +3,506 chars