Contents
After Oracle announced in 2009 that it would acquire Sun, the owner of MySQL, Michael Widenius, one of MySQL’s founders, started MariaDB to keep development community-driven and open. Many Linux distributions and hosting companies now ship it as their default.
What’s shared and what’s different
| Area | Status |
|---|---|
| Connecting from PHP, Python, Node.js | Identical, same libraries |
| Core SQL | Identical |
| Client tools | mysql works; recent versions also have mariadb |
| JSON type | In MariaDB an alias for LONGTEXT with validation; in MySQL a native binary type |
| Collations | MySQL 8 uses utf8mb4_0900_ai_ci, which MariaDB may not recognise |
| Advanced features | Each has its own, such as sequences in MariaDB |
The simpler an application’s SQL, the less likely you’ll notice any difference.
Example: fixing the collation error on migration
Importing a dump from MySQL 8 can fail with:
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci'
Replace the collation in the dump before importing:
sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' backup.sql
Then import again through phpMyAdmin or the command line.
Common mix-ups
- “MySQL” in cPanel: the name is historical; the engine may well be MariaDB. Check with
SELECT VERSION();. - Compatibility isn’t perfect both ways: moving from MySQL 5.7 to MariaDB is usually easy, but advanced MySQL 8 features need a review.
- Dump tools:
mysqldumpworks with MariaDB too; recent versions call itmariadb-dumpand may print a warning when you use the old name. - MariaDB isn’t PostgreSQL: it belongs to the MySQL family, and apps written for PostgreSQL won’t run on it as-is.
On ArabyHost
Databases on our hosting plans are from the MySQL/MariaDB family: create them with cPanel’s MySQL Databases tool and manage them in phpMyAdmin, as in the create a database guide. Moving a site? Use the WordPress migration guide or ask for free migration help. Daily JetBackup backups are there if you need to roll back after a bad import.
FAQ
Do I need to change WordPress code to run on MariaDB?
No. WordPress, WooCommerce and nearly all plugins run on MariaDB exactly as on MySQL, because the connection method and core SQL are the same.
Can I move a database from MySQL to MariaDB?
Yes, with an ordinary SQL dump. The most common snag is the utf8mb4_0900_ai_ci collation from MySQL 8, fixed by replacing it with utf8mb4_unicode_ci before importing.
Where does the name MariaDB come from?
From Maria, the daughter of founder Michael Widenius, just as MySQL was named after his elder daughter, My.