# Serverless MariaDB

> Free MariaDB cloud hosting, no card: 2 databases, 5 GB, TLS, and a web SQL console. MySQL wire-compatible, so mysql2, Prisma, and Drizzle connect unchanged.

Canonical: https://layerbase.com/db/mariadb
Last updated: 2026-10-24

Free MariaDB, $0/mo with no card: a real endpoint in seconds, speaking the MySQL wire protocol, so the MySQL drivers you already use connect unchanged. The same operational shape across cloud, desktop, and self-host.

## Key facts

| Fact | Value |
| --- | --- |
| Engine | MariaDB |
| Category | Relational |
| Upstream project | [MariaDB Server](https://mariadb.org/) |
| Layerbase Cloud | Yes |
| Free tier | Yes |
| Pricing | Free plan ($0/mo, no credit card), then $5 or $15/mo flat, no meters |
| Default version | 11.8 |
| Versions for new databases | 10.11, 11.4, 11.8, 12.3, 13.0 |
| Layerbase Desktop | Yes |
| SpinDB (local CLI) | Yes |
| Best for | MariaDB-native features, MySQL-compatible apps, and teams moving workloads off hosted MariaDB services. |

## Use cases

- Run MariaDB-specific features (Aria, ColumnStore, sequence support) without managing the binary
- Drop in as a MySQL-compatible backend for existing apps
- Per-environment databases for staging and dev that mirror production exactly
- Local development with the Layerbase CLI, deploy the same schema to cloud
- Self-host on your own hardware when you need control over the major version

## Cloud features

| Feature | Available |
| --- | --- |
| Always-on option | Yes |
| TLS encryption | Yes |
| HTTP access | No |
| IP allowlisting | Yes |
| Web query console | Yes |
| Sleeps when idle, wakes on connect | Yes |
| Automatic backups | Yes |
| Pooled connections | Yes |
| Direct connections | Yes |
| Serverless HTTP driver | No |

## Branch MariaDB, on the free tier

Fork a running MariaDB into a full, isolated copy with its own connection string. With Branching turned on for the database, copy-on-write makes it near-instant rather than a dump and restore, so a preview deploy, a CI job, and a risky migration can each get their own database and be deleted afterwards. MariaDB speaks the MySQL wire protocol, so most MySQL drivers connect to a branch unchanged.

## Common MariaDB questions

### What is MariaDB?

MariaDB is a community-developed fork of MySQL that speaks the same wire protocol while adding features of its own, such as Aria, ColumnStore, and sequence support. Because the protocol matches, most MySQL drivers and tools connect to it without code changes. Layerbase runs MariaDB as a managed endpoint on the Free plan, with TLS, a web SQL console, and hibernation when it goes idle.

### How is MariaDB different from MySQL on Layerbase?

They are separate engines with separate endpoints. MariaDB exposes MariaDB-specific features that diverge from MySQL; both speak the MySQL wire protocol so most clients connect to either without code changes.

### Which MariaDB version does Layerbase run?

Layerbase Cloud tracks recent stable MariaDB releases. The supported versions list is visible in the create flow.

### Can I use the mysql or mariadb command line client?

Either works. Most drivers and tools that target MySQL also work against MariaDB unchanged; for MariaDB-specific features, prefer the MariaDB-native driver where one exists.

### How does hibernation work for MariaDB on Layerbase?

A free MariaDB hibernates after 30 minutes of inactivity, the longer of the two free windows: MySQL and MariaDB cold-start slowly, so they get 30 minutes where most engines get 15. Paid plans hibernate after 6 hours, or stay always-on when pinned to your plan pool. It does wake on connect: the first connection is held open while the engine starts. Startup time varies with data and load. Allow a 30 second connect timeout and retry failed connections. You can also start it from the database page before you connect, or pin it always-on on a paid plan so it never sleeps.

### Can I run MariaDB locally too?

Yes. The Layerbase CLI and Layerbase Desktop both support MariaDB locally with the same versions you see in cloud.

### Is there a free MariaDB tier?

Yes. MariaDB is on the Free plan at $0/mo with no card: 2 databases, 5 GB of storage, and up to 20 concurrent connections. MySQL is not on the free tier, so MariaDB is the way to run a MySQL wire-compatible database here for free. Most MySQL drivers connect to it unchanged.

### Is free MariaDB cloud hosting a trial?

No. The Free plan has no expiry date and asks for no card. What it does have is scale-to-zero: a free MariaDB hibernates after 30 minutes idle, and one left hibernated for 14 days (7 if you never connected to it) is archived until you restore it, which takes about 10 to 30 seconds. Data and backups are kept throughout. Paid plans hibernate after 6 hours and are never auto-archived.

### What happens when my free MariaDB database goes idle?

It hibernates and keeps its hostname, port, and data. It does wake on connect: the first connection is held open while the engine starts. Startup time varies with data and load. Allow a 30 second connect timeout and retry failed connections. You can also start it from the database page before you connect, or pin it always-on on a paid plan so it never sleeps.

## Links

- [MariaDB on Layerbase](https://layerbase.com/db/mariadb)
- [Create a MariaDB database](https://layerbase.com/create/mariadb)
- [Connecting to MariaDB](https://layerbase.com/docs/cloud/connecting/mariadb)
- [Pricing](https://layerbase.com/pricing) (markdown: https://layerbase.com/pricing.md)
