Skip to main content
[ PIER ]

MariaDB

The community-developed fork of MySQL — open governance, drop-in compatible.

Database Cluster-ready #sql#relational#mysql-compatible

MariaDB is a community-developed, fully open-source fork of MySQL created by the original MySQL developers after the Oracle acquisition. It's binary-compatible with MySQL 5.x and remains drop-in for most MySQL 8.0 workloads, with extra storage engines (ColumnStore, Aria), Galera cluster, and a stronger OSS guarantee.

Deploy with Pier

  1. 1 Open the Pier dashboard and click Add service.
  2. 2 Pick MariaDB from the template list.
  3. 3 Choose the version, set a service name, and Pier provisions the container, storage, and ports automatically.
  4. 4 Attach a domain if you want HTTPS. Traefik auto-provisions the Let's Encrypt certificate.

What is MariaDB?

MariaDB started in 2009 as a community fork of MySQL by Monty Widenius — the original author of MySQL — and the core MySQL developers, immediately after the Oracle acquisition. The goal: keep MySQL fully open-source under an independent foundation, free from corporate license shifts.

Over 15 years it has diverged enough to have its own personality (Galera multi-master, Aria + ColumnStore engines, JSON paths) while remaining MySQL-compatible at the wire and protocol level. Wikipedia, Google, Mozilla, RedHat, SUSE, Booking.com, and many enterprise distributions ship MariaDB as the default “MySQL-compatible” database.

How Pier deploys it

Pier uses the official mariadb Docker image, mounting /var/lib/mysql as the data volume. The default version is latest (currently MariaDB 11.x); 10.11 (LTS) and 10.6 are available. Cluster mode (2–5 nodes) uses the bitnami/mariadb image with Galera replication.

Pier auto-generates a strong root password via MARIADB_ROOT_PASSWORD and exposes 3306 internally. Backups run mariadb-dump --single-transaction on schedule.

When NOT to use MariaDB

For embedded apps — SQLite. For Postgres-strength type system and SQL standard compliance — PostgreSQL. For pure caches — Redis. For pure analytics at petabyte scale — ClickHouse. MariaDB wins when you want a familiar, MySQL-compatible database with stronger OSS guarantees and Galera available.

Key features

MySQL-compatible

Same wire protocol, same SQL dialect, same client tools. Most ORMs, frameworks, and dump utilities work unchanged. Easy migration path from MySQL.

Galera Cluster (multi-master)

Synchronous multi-master replication via Galera. Write to any node; all nodes stay consistent. Built into MariaDB; needs a separate package on MySQL.

Aria & ColumnStore engines

Aria — crash-safe replacement for MyISAM. ColumnStore — columnar engine for analytics on the same database, no separate OLAP system needed.

Window functions, CTEs, JSON

Same modern SQL features as MySQL 8 — recursive CTEs, window functions, JSON paths, generated columns, sequences.

Open governance

Developed by the MariaDB Foundation (non-profit), not Oracle. License is GPLv2; clients are LGPL. No risk of source-available license shifts.

Production-tested at scale

Wikipedia, Google, Mozilla, Booking.com, ServiceNow — many former MySQL deployments migrated to MariaDB and stayed.

Use cases

MySQL drop-in replacement

Migrate from MySQL by changing one Docker image — most apps don't notice. Get extra storage engines and Galera as bonuses.

Multi-master cluster for high availability

Galera Cluster gives synchronous multi-master writes with no single point of failure — write to any node, read from any node.

OLTP + OLAP in one engine

ColumnStore engine adds columnar analytics tables to the same MariaDB. Run dashboards on the analytics tables, OLTP on InnoDB.

PHP application backend

Wikipedia migrated to MariaDB years ago; many WordPress hosts now default to MariaDB. Fully compatible with PHP MySQL extensions and WordPress.

Strict OSS-compliance environments

Government, EU public sector, regulated industries that require open governance — MariaDB Foundation provides legal certainty MySQL/Oracle can't.

Code examples

Create InnoDB table (MySQL-compatible DDL) sql
CREATE TABLE customers (
  id     INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  email  VARCHAR(255) NOT NULL UNIQUE,
  plan   ENUM('free', 'pro', 'team') DEFAULT 'free',
  meta   JSON,
  created DATETIME DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Recursive CTE (org chart traversal) sql
WITH RECURSIVE org_tree AS (
  SELECT id, name, manager_id, 1 AS depth
  FROM employees WHERE manager_id IS NULL
  UNION ALL
  SELECT e.id, e.name, e.manager_id, t.depth + 1
  FROM employees e JOIN org_tree t ON e.manager_id = t.id
)
SELECT * FROM org_tree ORDER BY depth, name;
Window function (rank within group) sql
SELECT product_id, region, sales,
       RANK() OVER (PARTITION BY region ORDER BY sales DESC) AS rank
FROM sales_by_region;
Backup with mariadb-dump bash
docker exec -i pier-mariadb \
  mariadb-dump -u root -p"$MARIADB_ROOT_PASSWORD" \
               --single-transaction --routines --triggers appdb \
  | gzip > appdb-$(date +%F).sql.gz

How it compares

vs MySQL Through 5.x they're binary-compatible. MariaDB 10+ vs MySQL 8+ have diverged — MariaDB adds Galera and more storage engines; MySQL added some optimizer improvements. Both are excellent.
vs PostgreSQL Postgres has a richer type system and stricter SQL compliance; MariaDB has wider deployment in PHP/WordPress ecosystems and easier replication for MySQL veterans.
vs SQLite SQLite for embedded single-writer apps. MariaDB for networked multi-writer.
vs Galera Cluster vs MySQL InnoDB Cluster Galera is synchronous multi-master (write anywhere). InnoDB Cluster is async with explicit primary failover. Pick Galera if you want write-anywhere; InnoDB Cluster if you prefer the MySQL-blessed path.

Frequently asked questions

Which version does Pier deploy?
Default is `latest` (MariaDB 11.x at time of writing). Versions 11, 10.11 (LTS), and 10.6 are also in the selector. Pin a major version in production.
Can I replace MySQL with MariaDB seamlessly?
For MySQL 5.x — yes, near-perfect drop-in. For MySQL 8+ — usually yes, but audit features like default authentication plugin (caching_sha2_password vs mysql_native_password), JSON paths, and specific optimizer behaviors.
Does it support cluster mode?
The Pier template supports clusters of 2–5 nodes via the bitnami/mariadb image. Galera Cluster is the underlying replication.
Is the data file format compatible with MySQL?
For InnoDB through MySQL 5.7 / MariaDB 10.2 — yes. Beyond that, file format may diverge — always migrate via mysqldump/mariadb-dump rather than raw file copy.
Default port and connection?
3306/tcp. URI is `mysql://root:password@host:3306/db` — the MySQL protocol means mysql:// scheme works.
What's the license situation?
Server is GPLv2 (same as MySQL Community). Client libraries are LGPL (more permissive than MySQL's GPL client lib). Both are fully open source with no source-available components.
Should I pick MySQL or MariaDB for a new project?
For pure web/PHP/WordPress — either works. For Galera multi-master — MariaDB. For Oracle Cloud / enterprise support contracts — MySQL. For strict OSS governance guarantees — MariaDB.

Related services

Deploy on your VPS

MariaDB is a community-developed, fully open-source fork of MySQL created by the original MySQL developers after the Oracle acquisition. It's binary-compatible with MySQL 5.x and remains drop-in for most MySQL 8.0 workloads, with extra storage engines (ColumnStore, Aria), Galera cluster, and a stronger OSS guarantee.

Deploy this service →