The Short Answer
Both are open-source relational database servers that store data in InnoDB tables and answer SQL over the same client protocol. An application that uses common SQL, such as most content management systems, works with either. The differences show up in administration: how accounts log in, which features exist, how replication is set up, and which commands you type. Neither is a drop-in replacement for the current version of the other.
Where MariaDB Came From
MariaDB began in 2009, when some of MySQL's original developers forked the code around the time MySQL changed owners. For several years MariaDB tracked MySQL closely, and a server could be swapped for the other without changes. Since then both projects have added features on their own, and the version numbers have separated: MySQL counts 8.x, 9.x, and up, MariaDB 10.x, 11.x, and up. A MariaDB 10 is not older than a MySQL 8; the numbers are not comparable. For background on the server itself, see what is MySQL.
Differences That Matter on a Server
| Topic | MySQL | MariaDB |
|---|---|---|
| Password login | caching_ | native password |
| Root on install | Socket on Ubuntu | Socket |
| JSON column | Binary type | Text with a check |
| GTIDs | Own format | Own format |
| Clustering | Group Replication | Galera |
| Client | mysql | mariadb |
| Dump tool | mysqldump | mariadb- |
| Server program | mysqld | mariadbd |
Authentication
MySQL's default password method is caching_. The older mysql_ is disabled by default in MySQL 8.4 and removed in 9.0. MariaDB still uses mysql_ for password accounts and creates root with the unix_ plugin, so sudo mariadb logs in without a password. On Ubuntu, MySQL's root uses the similar auth_ plugin. A client library that is old enough may support only one of these methods, which is a common reason a program connects to one server and not the other.
JSON, Replication, and Features
- JSON: MySQL stores JSON in a binary format of its own. In MariaDB, JSON is another name for a long text column with a validity check. The JSON functions overlap but are not identical.
- Replication: both have binary-log replication and GTIDs, but the GTID formats differ. Replicating between the two works only in limited cases; test it before you rely on it.
- Own features: MariaDB has sequences, system-versioned tables, and the Aria engine. MySQL has the X Protocol on port 33060 and its document store.
Which One Each Distribution Ships
| Distribution | Packaged server |
|---|---|
| Ubuntu | Both; MySQL is mysql- |
| Debian 12, 13 | MariaDB only |
| AlmaLinux, Rocky | Both, in AppStream |
Ubuntu 24.04 ships MySQL 8.0 and Ubuntu 26.04 ships MySQL 8.4. The installation steps are in how to install MySQL on Ubuntu and how to install MariaDB. On Debian, default-mysql-server installs MariaDB, and the mysql command there is MariaDB's client.
How to Tell Which One You Have
sudo mysql -e "SELECT VERSION();"A MariaDB server includes the word MariaDB in the version string. See how to check the MySQL version for the other methods.
Switching Between Them
- Dump every database with the tool of the current server, for example
mysqldump --single-transaction appredirected to a file, and copy the dumps off the server. - Install the other server on a new or test machine, not over the existing data directory. Neither server reliably reads the other's current data files.
- Recreate the accounts with
CREATE USERandGRANT, because login plugins differ. - Load the dumps and run the application's tests against the new server.
- Switch the application only after the tests pass.
Updated:
Linux VPS with Full Root Access
MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.
More Guides
No Limits on Service or Support
You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

- 100% customer satisfaction goal
- Our own hardware
- 24/7 ticket and email support
- 4 countries with locations