# Serverless MySQL

> Managed MySQL hosting in under 30 seconds: TLS, web SQL console, branching, from $5/mo. Need free? MariaDB speaks the MySQL wire protocol on the Free plan.

Canonical: https://layerbase.com/db/mysql
Last updated: 2026-09-07

A real MySQL endpoint in seconds. TLS by default, every standard MySQL driver works, from $5/mo on Solo. Not ready to pay? MariaDB speaks the same MySQL wire protocol on the Free plan, so mysql2, Prisma, and Drizzle connect to it unchanged. Cloud, desktop, or self-host with the Layerbase CLI.

## Key facts

| Fact | Value |
| --- | --- |
| Engine | MySQL |
| Category | Relational |
| Upstream project | [MySQL](https://www.mysql.com/) |
| Layerbase Cloud | Yes |
| Free tier | No |
| Pricing | From Solo, $5/mo flat, no meters |
| Default version | 9.7 |
| Versions for new databases | 8.4, 9.7 |
| Layerbase Desktop | Yes |
| SpinDB (local CLI) | Yes |
| Best for | WordPress-style apps, Rails or Laravel workloads, existing MySQL schemas, and services that need broad MySQL client compatibility. |

## Use cases

- Host a WordPress, Rails, or Laravel app database without setting up your own server
- Run migrations from a legacy MySQL deployment without changing client code
- Serverless apps that prefer the PlanetScale serverless driver over a TCP connection
- Per-developer dev databases that match production exactly
- Self-host on your own hardware with the Layerbase CLI when compliance requires it

## 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 | Yes |

## Branch MySQL, or reach it over HTTP

Fork a running MySQL database into an isolated copy with its own connection string, disposable once the pull request merges and near-instant with copy-on-write once Branching is turned on in the database Settings tab. The same database also answers a PlanetScale-compatible serverless HTTP endpoint, so edge runtimes that cannot hold a TCP connection can query it with the @planetscale/database client or the Drizzle planetscale-serverless adapter. Normal MySQL drivers keep talking to the normal TLS port.

## Common MySQL questions

### Is there a free MySQL tier?

Not for MySQL itself: it starts on Solo at $5/mo, having moved off the Free plan in July 2026 because it holds around half a gigabyte of memory sitting idle. The free path is MariaDB, which is on the Free plan at $0/mo with no card (2 databases, 5 GB of storage, up to 20 concurrent connections) and speaks the MySQL wire protocol, so mysql2, Prisma, Drizzle, mysqldump, the mysql CLI, Workbench, and DBeaver all talk to it without a code change. If you later need MySQL itself, the Convert tab on the database page does it in one click on Solo and above: it copies your MariaDB database into a new MySQL one without touching the original, and can carry your existing host, port, and password across so your connection string keeps working. A pre-check looks for the things MySQL cannot take, such as sequences or MariaDB-only column types, before it starts; it is best-effort rather than a guarantee, and row counts are compared table by table once the copy finishes. The same tab runs MySQL to MariaDB, so the door is open in both directions.

[Free MariaDB on Layerbase](https://layerbase.com/db/mariadb)

### What is MySQL?

MySQL is one of the most widely deployed open-source relational databases, the default backend behind WordPress-style apps and a great many Rails and Laravel projects. Nearly every language has a mature MySQL driver, so the wire protocol is about as portable as SQL gets. Layerbase runs it as a managed endpoint with TLS on by default and a web SQL console, and the same engine runs locally through the Layerbase CLI and Layerbase Desktop.

### How much does managed MySQL hosting cost?

MySQL starts on Solo at $5/mo, which is the cheapest plan that can create it, and Pro is $15/mo. Both are flat monthly prices with no usage meters, and the create flow shows the cost before you provision anything. MySQL is not on the Free plan, but MariaDB is, and it speaks the same MySQL wire protocol, so most MySQL drivers still have a free path here at $0/mo.

### Which MySQL version do you run?

Layerbase Cloud tracks recent stable MySQL releases, currently 9.x, with 8.4 also available. You can pick a specific supported version from the create flow.

### Do you support the PlanetScale serverless driver?

Yes. MySQL-family databases on Layerbase also speak the PlanetScale serverless driver via an HTTP-based hostname, which is the right path for edge runtimes that cannot hold a TCP connection.

### Can I use mysqldump and standard tooling?

Yes. The endpoint speaks the standard MySQL wire protocol. mysqldump, mysql CLI, MySQL Workbench, DBeaver, Prisma, Drizzle, and any standard driver work without code changes.

### How is TLS configured on a Layerbase MySQL database?

TLS is required and enabled by default. Most clients accept the default trust store; for stricter setups, the dashboard exposes the CA certificate.

### Can I run MySQL locally?

Yes. The Layerbase CLI manages multiple local MySQL versions with one command (lbase create mydb -e mysql), and Layerbase Desktop adds a GUI on top.

## Links

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