MariaDB
Overview
MariaDB is a community-developed fork of MySQL started by core members of the original MySQL team, designed as a drop-in replacement with additional storage engines, features, and a permissive license. Read this when you want a MySQL-compatible relational database with the MariaDB ecosystem (e.g., Galera clustering, additional engines).
Official sources
Install / setup
MariaDB ships in the standard repositories of major Linux distributions as the mariadb-server package. On Ubuntu/Debian (from the official quickstart install guide):
sudo apt update
sudo apt install mariadb-server mariadb-client galera-4
sudo mariadb-secure-installation
For specific MariaDB versions, the MariaDB download page (mariadb.org/download/) generates tailored repository setup instructions per OS/architecture.
Core concepts
- MySQL compatibility: largely a drop-in replacement; the
mysql/mariadb client and wire protocol are compatible.
- Pluggable storage engines: InnoDB by default, plus MariaDB-specific engines (Aria, ColumnStore, etc.).
- Galera Cluster: synchronous multi-source replication for high availability (the
galera-4 package).
- Indexes, transactions, and ACID semantics under InnoDB, as in MySQL.
mariadb-secure-installation to harden a new server.
- Character sets/collations: use
utf8mb4 for full Unicode.
Best practices
- Use InnoDB for transactional, crash-safe workloads (the default engine).
- Use
utf8mb4 rather than legacy utf8 for full Unicode support.
- Run
mariadb-secure-installation after install to remove anonymous users and test databases.
- For high availability, evaluate Galera Cluster rather than rolling your own replication.
- Verify query plans with
EXPLAIN and index columns used in joins and filters.
Common pitfalls
- Assuming 100% feature parity with the latest MySQL → divergence has grown; check the MariaDB docs for version-specific syntax and functions.
- Using legacy
utf8 and hitting 4-byte character errors → use utf8mb4.
- Mixing MariaDB and MySQL client/server versions and assuming identical behavior → confirm compatibility for your versions.
- Skipping
mariadb-secure-installation on a fresh server → insecure defaults remain.
Examples
CREATE TABLE orders (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
customer_email VARCHAR(255) NOT NULL,
total_cents INT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Further reading
Related skills
- ../mysql — the upstream project MariaDB forked from
- ../postgresql — alternative open-source RDBMS
1---2name: mariadb3description: Community-developed open-source fork of MySQL with extra storage engines and features; consult for MySQL-compatible relational backends.4domain: stack5category: database6tags: [mariadb, sql, rdbms, relational, mysql-fork]7official_sources:8 - https://mariadb.com/docs/9 - https://github.com/MariaDB/server10verified: 2026-06-1611metadata:12 source: https://skillmd.com/skills/gabriel7silva/mariadb13---1415# MariaDB1617## Overview18MariaDB is a community-developed fork of MySQL started by core members of the original MySQL team, designed as a drop-in replacement with additional storage engines, features, and a permissive license. Read this when you want a MySQL-compatible relational database with the MariaDB ecosystem (e.g., Galera clustering, additional engines).1920## Official sources21- Docs: https://mariadb.com/docs/22- Repo (official, MariaDB Foundation/Corporation): https://github.com/MariaDB/server23- Download: https://mariadb.org/download/2425## Install / setup26MariaDB ships in the standard repositories of major Linux distributions as the `mariadb-server` package. On Ubuntu/Debian (from the official quickstart install guide):2728```bash29sudo apt update30sudo apt install mariadb-server mariadb-client galera-431sudo mariadb-secure-installation32```3334For specific MariaDB versions, the MariaDB download page (mariadb.org/download/) generates tailored repository setup instructions per OS/architecture.3536## Core concepts37- MySQL compatibility: largely a drop-in replacement; the `mysql`/`mariadb` client and wire protocol are compatible.38- Pluggable storage engines: InnoDB by default, plus MariaDB-specific engines (Aria, ColumnStore, etc.).39- Galera Cluster: synchronous multi-source replication for high availability (the `galera-4` package).40- Indexes, transactions, and ACID semantics under InnoDB, as in MySQL.41- `mariadb-secure-installation` to harden a new server.42- Character sets/collations: use `utf8mb4` for full Unicode.4344## Best practices45- Use InnoDB for transactional, crash-safe workloads (the default engine).46- Use `utf8mb4` rather than legacy `utf8` for full Unicode support.47- Run `mariadb-secure-installation` after install to remove anonymous users and test databases.48- For high availability, evaluate Galera Cluster rather than rolling your own replication.49- Verify query plans with `EXPLAIN` and index columns used in joins and filters.5051## Common pitfalls52- Assuming 100% feature parity with the latest MySQL → divergence has grown; check the MariaDB docs for version-specific syntax and functions.53- Using legacy `utf8` and hitting 4-byte character errors → use `utf8mb4`.54- Mixing MariaDB and MySQL client/server versions and assuming identical behavior → confirm compatibility for your versions.55- Skipping `mariadb-secure-installation` on a fresh server → insecure defaults remain.5657## Examples58```sql59CREATE TABLE orders (60 id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,61 customer_email VARCHAR(255) NOT NULL,62 total_cents INT NOT NULL,63 created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP64) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;65```6667## Further reading68- MariaDB quickstart guides: https://mariadb.com/docs/server/mariadb-quickstart-guides/69- Downloads & repository setup: https://mariadb.org/download/7071## Related skills72- ../mysql — the upstream project MariaDB forked from73- ../postgresql — alternative open-source RDBMS