# MariaDB

MariaDB is a fast, open-source relational database server forked from MySQL by its original developers. It is open source and self-hosted, installable on TrueNAS, Docker Hub, Proxmox, Kubernetes (Helm), ZimaOS and Unraid.

Canonical page: https://ourlocalhost.com/app/320/mariadb

## Description

MariaDB is a fast, open-source relational database server forked from MySQL by its original developers. It serves as a drop-in replacement for MySQL with additional features and is widely used for self-hosted web applications, home automation backends, and other services that need a persistent relational data store.

## Platform availability

Available on 5 of 9 platforms: Unraid, TrueNAS, ZimaOS, Proxmox, Helm.

## Health score

79/100 (Good), based on 3 of 4 factors.
- Maintained: 100 (last commit 17 days ago)
- Popular: 49 (268 GitHub stars)
- Easy to install: 75 (5 install platforms, install notes, Docker image)

## Links

- TrueNAS: https://apps.truenas.com/catalog/mariadb/
- Docker Hub: https://hub.docker.com/r/linuxserver/mariadb
- Proxmox: https://community-scripts.github.io/ProxmoxVE/scripts?id=mariadb
- Kubernetes (Helm): https://artifacthub.io/packages/helm/bitnami/mariadb
- ZimaOS: https://github.com/IceWhaleTech/CasaOS-AppStore/tree/main/Apps/MariaDB
- Unraid: https://ca.unraid.net/apps/mariadb-official-1g0fz030r4fudz?q=MariaDB-Official
- Official website: https://mariadb.org/
- GitHub: https://github.com/linuxserver/docker-mariadb
- Documentation: https://mariadb.org/documentation/

## Common questions

### What should I set before first start so I have a reliable MariaDB admin login?

Set the MARIADB_ROOT_PASSWORD environment variable before starting MariaDB the first time. It creates the admin login and helps keep the database from being left open.

### Which host port should be exposed for MariaDB client connections?

Expose port 3306 on the host, for example with -p 3306:3306. If it is not open, apps on your network cannot reach the database.

### Which directory should be mounted to prevent data loss when recreating the container?

Mount a Docker volume to /var/lib/mysql so your databases and settings are saved outside the container. If you recreate the container without that storage, you can lose all your data.

### Is it safe to update a Dockerized MariaDB used by self-hosted apps?

The provided Reddit thread reports conflicting advice: some say updating can break things, while others say it should be updated. It does not give a final recommendation.

### What common connection problems does the MariaDB troubleshooting guide address?

It addresses diagnosing and fixing common MariaDB Server connection problems, such as Can't connect to local server and access-denied errors.

## Alternatives

- Apache Cassandra
- CockroachDB: CockroachDB is a distributed SQL database for developers and operators of transactional applications that need horizontal scaling and resil…
- CouchDB: Apache CouchDB is a JSON document database with an HTTP API, used as a sync backend for offline-first applications and Obsidian LiveSync.
- IBM DB2: DB2 offers industry leading performance, scale, and reliability on your choice of platform from Linux to z/OS.
- Microsoft SQL Server: SQL Server delivers on Microsoft’s Data Platform vision by helping your organization manage your data by enabling you to store data from st…
- MongoDB: MongoDB is a cross-platform, open-source document-oriented NoSQL database that stores data in flexible, JSON-like BSON documents instead of…
- PostgreSQL: PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity.
- SQLite: SQLite is a lightweight, embedded relational database engine that stores an entire database in a single file on your device.

---
Source: Our Local Host (https://ourlocalhost.com/app/320/mariadb), the self-hosted and open-source app directory.
