MySQL and MariaDB: what is the difference?
Two databases that speak the same SQL and the same connection protocol, with a history and a licensing model that pulled them apart.
If you have ever opened phpMyAdmin and noticed it reports the server as MariaDB rather than MySQL, and wondered whether that changes anything about the site you are running on it — the short answer is almost never, and the longer answer is a reasonably interesting piece of open-source history.
Where MariaDB came from
MySQL was an independent open-source company's product before Sun Microsystems bought it in 2008, and then Oracle acquired Sun — and MySQL along with it — in 2010. That put the database millions of websites depended on under the control of a large company with its own commercial database products, and it made a portion of the open-source community uneasy enough to act on it.
Michael Widenius, one of MySQL's original creators, led the creation of MariaDB as a fork: a complete copy of the MySQL source code at the point of the fork, developed onward independently under a foundation structure rather than a single company. It was built specifically to remain a drop-in replacement — the same SQL syntax, the same connection protocol, the same command-line tools — so that switching from MySQL to MariaDB would not require rewriting anything.
How compatible are they, in practice?
For the overwhelming majority of what a website does — standard SQL queries, standard table structures, connecting through mysqli or PDO in PHP — the two are interchangeable. This is precisely why the switch is invisible to most site owners: WordPress, most PHP applications, and the client libraries that connect to them do not need to know or care which one is actually running underneath.
| Area | Compatible? |
|---|---|
| Standard SQL (SELECT, INSERT, UPDATE, JOIN, etc.) | Yes, fully |
| Connection protocol and client libraries (mysqli, PDO_mysql) | Yes, fully |
| mysqldump / mysql command-line tools | Yes, both ship compatible versions |
| Every storage engine and every advanced feature | No — see below |
Where they have actually diverged
The two projects have been developed independently for well over a decade now, and while the core stays compatible, each has added things the other has not:
- Storage engines. MariaDB ships additional storage engines beyond the ones MySQL includes, such as Aria and ColumnStore, aimed at specific workloads most standard websites never touch.
- Licensing. MySQL is dual-licensed — a GPL community edition alongside a commercial Enterprise edition with additional paid features. MariaDB is developed entirely as open source under a foundation, with no separate paid edition of the core database itself.
- Version numbering diverged. Early MariaDB releases tracked MySQL version numbers closely; more recent releases of both have their own independent numbering, which is a sign of how far the codebases have actually spread apart under the surface, even where the SQL you write looks identical.
- Some newer MySQL features arrive late or differently in MariaDB, and vice versa. Neither project is simply "the other one plus more" — each has made its own choices about what to prioritise.
You will find plenty of claims online about one outperforming the other. Performance depends heavily on the specific query, table structure, configuration and version being compared, and a fair comparison is more involved than most of what gets written about it. If speed genuinely matters for a specific workload, test it directly on your own data rather than trusting a general claim either way.
Does it matter which one your hosting runs?
For a standard WordPress site, an off-the-shelf PHP application, or anything using conventional SQL, no — the compatibility described above means your site works the same either way, and moving between hosts that use different ones is not something you need to plan around specially.
It starts to matter only if your application deliberately relies on a feature specific to one of them — a storage engine unique to MariaDB, or a MySQL Enterprise-only feature, neither of which a typical website uses. If you are building something from scratch and have no particular reason to prefer either, the standard SQL, PHP and WordPress guidance in this knowledgebase applies equally to both.
Why the distinction survives at all
Given how compatible the two remain, it is fair to ask why the fork still matters enough to be written about. The answer is mostly about who controls the roadmap. A company the size of Oracle can fund development at a scale an independent foundation cannot always match, but it also means decisions about MySQL's direction sit with a single commercial entity with its own separate paid product line. MariaDB exists specifically as an alternative governed outside that structure. For most site owners this is background rather than something to act on, but it explains why two databases this compatible are still developed, discussed and chosen between as if they were genuinely separate products.
Checking which one you are running
Run the following from the SQL tab in phpMyAdmin, or from any connected client:
SELECT VERSION();
A MariaDB server identifies itself clearly in the returned version string; a MySQL server's version string does not mention MariaDB at all. phpMyAdmin's own front page also states which one it is connected to, usually without needing to run anything.
Where this actually comes up
The most common place this distinction becomes practical rather than academic is a migration between two different hosts — see creating a database and user and the export and import guides elsewhere in this section, none of which need to know or care which of the two you are moving between, precisely because of the compatibility described above. Character set handling is identical between them too, so what utf8mb4 is and why it matters and optimising a database apply unchanged regardless of which one is running your site.
Related reading
Every application needs a database, a user, and that user attached to the database — here is the order to do it in.
What is utf8mb4 and why does it matter?MySQL called something utf8 that was not quite real UTF-8, and utf8mb4 is the character set that actually is.
How to optimise a MySQL databaseOPTIMIZE TABLE reclaims space and refreshes statistics — but it behaves differently depending on the storage engine underneath.
How many databases can I create?It depends on your plan, and the number is shown in your control panel rather than fixed across every account.