MariaDB
Updated on October 27, 2026
MariaDB
MariaDB is a community fork of MySQL, compatible with its protocol and drivers: if your tool speaks MySQL, it speaks MariaDB.
Creating an instance
+ New service → Database → MariaDB. Credentials (host, port, user, password, database name) are generated automatically and visible in the service panel, Connection tab.
Connection string
# From another service in the same project (internal network)
DATABASE_URL=mysql://user:password@internal-host:3306/mydatabase
# From outside (exposed public port)
DATABASE_URL=mysql://user:password@public-ip:PORT/mydatabase
The connection string scheme remains
mysql://: MySQL drivers work as-is with MariaDB.
Prisma
datasource db {
provider = "mysql" // valid for MariaDB
url = env("DATABASE_URL")
}
mysql2 (Node.js)
import mysql from "mysql2/promise";
const pool = mysql.createPool(process.env.DATABASE_URL!);
const [rows] = await pool.query("SELECT * FROM users WHERE id = ?", [42]);
MySQL or MariaDB?
| Criterion | Verdict |
|---|---|
| Application compatibility | Identical in the vast majority of cases |
| WordPress, PHP tools | Both work. MariaDB is often recommended |
| Very specific recent features (MySQL 8 JSON…) | Check for parity before choosing |
If in doubt, stick with whatever your framework documents. Migrating from one to the other remains simple (dump/restore).
Backups
As with other databases, remember to take regular dumps:
mysqldump -h HOST -P PORT -u USER -p MYDATABASE > backup.sql