MariaDB
The community-developed fork of MySQL — open governance, drop-in 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 Open the Pier dashboard and click Add service.
- 2 Pick MariaDB from the template list.
- 3 Choose the version, set a service name, and Pier provisions the container, storage, and ports automatically.
- 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 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; 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; SELECT product_id, region, sales,
RANK() OVER (PARTITION BY region ORDER BY sales DESC) AS rank
FROM sales_by_region; 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?
Can I replace MySQL with MariaDB seamlessly?
Does it support cluster mode?
Is the data file format compatible with MySQL?
Default port and connection?
What's the license situation?
Should I pick MySQL or MariaDB for a new project?
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 →