UnderHost
Knowledgebase Docs

MariaDB vs MySQL-differences and compatibility

Compare MariaDB and MySQL: performance differences, storage engines, JSON support, and compatibility for WordPress.

On this page

MariaDB and MySQL are two separate but compatible database systems. MariaDB was created by the original MySQL developers after Oracle Corporation acquired MySQL in 2010. Today, many hosting providers (including UnderHost) offer MariaDB as the default, though MySQL is still widely available. For most users and applications, they're functionally interchangeable.

What is MariaDB?

MariaDB is an open-source relational database system developed as a community-driven fork of MySQL. It maintains MySQL compatibility while adding new features, performance improvements, and additional storage engines.

Key facts about MariaDB:

  • Created by Monty Widenius, the original MySQL developer
  • Fully open-source under GPL license (no commercial license required)
  • Actively maintained with regular security updates
  • Versions numbered 10.x, 11.x (after version 10, numbering diverged from MySQL)
  • Used by Wikipedia, WordPress.com, and major companies worldwide

Drop-in replacement concept

"Drop-in replacement" means MariaDB can replace MySQL in most scenarios without any code changes. The connection protocols, SQL syntax, and PHP extensions are identical or nearly identical.

Why this matters:

  • WordPress, Drupal, Magento, and other CMS systems work on either without modification
  • PHP's mysqli extension works with both
  • Database dumps (exports) from MySQL can be imported into MariaDB and vice versa
  • Most SQL queries work identically on both

Limitations to the "drop-in" claim:

  • Some advanced features (JSON, window functions, etc.) are newer in MariaDB and may not exist in older MySQL versions
  • Very old MySQL versions (5.1) don't have full compatibility with current MariaDB
  • Custom stored procedures using MySQL-specific syntax may need tweaks

Key differences between MariaDB and MySQL

FeatureMariaDB (10.x+)MySQL (8.0+)
License100% open source (GPL)Open source + commercial versions
OrganizationMariaDB Foundation, community-drivenOracle Corporation
Default storage engineInnoDB (with Aria option)InnoDB
JSON supportNative JSON type (10.2+)Native JSON type (5.7+)
PerformanceOften faster for read-heavy workloadsStrong overall, especially writes
Version numbering10.x, 11.x5.7, 8.0
Update frequencyRegular community updatesQuarterly Oracle releases
Common usesHosting, WordPress, open-source projectsEnterprise, high-transaction systems

WordPress and other applications

WordPress, Drupal, Magento, and Joomla all work identically on MariaDB and MySQL. WordPress has been tested on MariaDB since version 5.5 and officially supports it.

WordPress uses the PHP mysqli extension (modern) or legacy mysql extension (deprecated) to connect. Both extensions work with either database.

To verify WordPress database type:

  1. Log in to WordPress admin panel
  2. Go to ToolsSite Health
  3. Check the database server version listed

No matter what it says, WordPress will run identically. The database system is invisible to WordPress users.

How to check which you're running

Method 1: SSH command line

mysql --version

# Output example:
# mysql  Ver 15.1 Distrib 10.6.14-MariaDB (MariaDB)
# OR
# mysql  Ver 8.0.35-0ubuntu0.22.04.1 for Linux on x86_64

Method 2: phpMyAdmin

  1. Log into phpMyAdmin (via cPanel)
  2. Check the top-left corner—it displays "MariaDB X.X.X" or "MySQL X.X.X"

Method 3: PHP script

<?php
echo phpversion();  // Shows PHP version
$conn = new mysqli(...);
echo $conn->server_info;  // Shows MariaDB or MySQL version
?>

Method 4: cPanel

  1. Log into cPanel
  2. Go to HomeServer Information
  3. Look for "MySQL/MariaDB Version"

Migrating between MariaDB and MySQL

Can you switch from one to the other? Yes, is generally straightforward:

Steps to migrate:

  1. Export your database: Use mysqldump or phpMyAdmin to export your database as SQL
  2. Stop your application: Take your website offline temporarily
  3. Create new database: In the target database system, create a fresh database
  4. Import the dump: Import the SQL file into the new database
  5. Update connection details: Update your wp-config.php or application config if the host/port changed
  6. Test thoroughly: Verify all functions work before going live

For most applications, this process works seamlessly. Your data structure remains identical.

Which one should you use?

For most users and projects, the choice doesn't matter.

Use MariaDB if:

  • Your hosting provider defaults to it (like UnderHost)
  • You prefer 100% open-source stack
  • You want frequent community-driven updates
  • You're running WordPress or other open-source CMS

Use MySQL if:

  • You have existing MySQL expertise
  • You require Oracle's commercial support
  • You're in an enterprise environment with Oracle contracts
  • You need guaranteed compatibility with Oracle technologies

The reality: Most developers and site owners never notice which one they're using. Both are stable, secure, and performant for web applications.

UnderHost uses MariaDB by default

UnderHost hosting accounts include MariaDB as the default database system. All shared hosting, Cloud VPS, and most dedicated servers use MariaDB, which is fully compatible with all popular applications.

Related: Database administration | InnoDB storage engine | SQL basics | Updating MySQL/MariaDB

Was this article helpful?

Need hosting for database-backed apps?

Run WordPress, CMS, PHP apps, and MySQL/MariaDB workloads on UnderHost hosting, VPS, or managed servers.

Related articles

Back to Database