Skip to content
MySQL

Serverless MySQL

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.

SQL Console
MySQL

Tables

  • users
  • events
  • orders
  • sessions
SELECT id, name, created_at
FROM events
WHERE created_at > NOW() - INTERVAL '7 days'
ORDER BY id DESC LIMIT 5;
idnamecreated_at
1247signup2026-03-12 14:21
1246purchase2026-03-12 14:08
1245login2026-03-12 13:55
1244signup2026-03-12 13:44
1243purchase2026-03-12 13:30
5 rows ยท 12ms
  • Flat pricing

    From $5/mo, no meters

  • Encrypted

    TLS on every plan

  • Layerbase Cloud

    Managed, in seconds

  • Desktop and CLI

    Run it locally or self-host

Branch MySQL, or reach it over HTTP

Fork a running MySQL database into an isolated copy with its own connection string: copy-on-write, near-instant, and disposable once the pull request merges. 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.

Serverless and edge access
Branch it from the CLI
lbase cloud branch app-db pr-482
lbase cloud branch ls app-db
lbase cloud branch delete app-db pr-482

Connect with any MySQL client

WordPress-style apps, Rails or Laravel workloads, existing MySQL schemas, and services that need broad MySQL client compatibility.

  • 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
Full MySQL connection guide
bash
MySQL
mysql --ssl-mode=REQUIRED -h your-host.cloud.layerbase.dev -P <port> -u layerbase -p app

What managed MySQL costs here, and how it behaves

MySQL is not on the Free plan. It starts on Solo at $5/mo, a flat price with no usage meters. If free is the hard requirement, create a MariaDB instead: it is on the Free plan at $0/mo, speaks the MySQL wire protocol, and your MySQL drivers connect to it unchanged. This is what the $5 buys, how the two engines relate, and what happens when nobody is connected.

MySQL needs the Solo plan, $5/mo

Solo is $5/mo flat: 2 databases, 10 GB of storage, up to 100 concurrent connections, and a 768 MB always-on pool. Pro is $15/mo above it with 10 databases and 25 GB. MySQL moved off the Free plan in July 2026 because it allocates around half a gigabyte sitting idle, before its pooler sidecar; MariaDB stayed free as the wire-compatible escape hatch.

MariaDB is the free MySQL-compatible way in

MariaDB runs on the Free plan at $0/mo with no card: 2 databases, 5 GB of storage, and up to 20 concurrent connections, over TLS, speaking the MySQL wire protocol. mysql2, Prisma, Drizzle, mysqldump, the mysql CLI, Workbench, and DBeaver connect to it without a code change, so a MySQL app usually only changes its connection string. Start there if the budget is zero.

Moving between the two later is one click, either direction

The two engines share the wire protocol and the mysqldump format, and Layerbase does the move for you: the Convert tab copies the database into a new one on the other engine, non-destructively, and can move your existing host, port, and password across so the connection string in your app keeps working. It runs both ways. MariaDB to MySQL needs Solo, because that is where MySQL starts; a pre-check looks for the things MySQL cannot take, such as sequences or MariaDB-only column types, before it copies a row, and row counts are compared table by table once the copy finishes.

It wakes on connect, but budget about 20 seconds for it

A paid MySQL database hibernates after 6 hours with no connections. It wakes on connect: the first connection is held open while the engine starts. The cold start runs about 20 seconds though, longer than some client connect timeouts (mysql2 defaults to 10), so give your client a 30 second connect timeout or expect the first attempt to time out and retry. You can also start it from the database page before you connect, or pin it to your always-on pool so it never sleeps. Pinning MySQL draws 768 MB, which is the entire Solo pool, so on Solo the database you do not pin sleeps and wakes like a free one.

Your MySQL drivers connect unchanged

TLS is on by default and the endpoint sits behind a connection pooler, so mysql2, Prisma, Drizzle, mysqldump, the mysql CLI, Workbench, and DBeaver all work. MySQL is routed on its own allocated port rather than a shared 3306, so copy the exact port from Quick Connect. Edge runtimes that cannot hold a TCP connection get a PlanetScale-compatible serverless HTTP endpoint on the same database.

Branches for pull requests and previews

Fork a running MySQL database into an isolated copy with its own connection string: copy-on-write, near-instant, disposable when the pull request merges. Solo allows 3 branches per database and Pro 10, and a branch does not consume a slot from your plan database count.

Nothing expires, and backups are automatic

Auto-archiving is a free-tier sweep, so a paid database is never archived however long it sits. Solo takes a daily backup with 7 days of rolling retention and 3 manual slots you trigger yourself; Pro keeps 30 days and 10 slots. Restore is one click from the dashboard, onto the same database or into a new one.

Create a MySQL database

MySQL needs the Solo plan, $5/mo flat. Pro is $15/mo. MariaDB is the free wire-compatible alternative.

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
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.

Branch MySQL in seconds

Fork a running MySQL into a full, isolated copy with its own connection string. Copy-on-write makes it near-instant, not a dump and restore. Point a preview deploy at it, test a migration, then throw it away. Layerbase branches 16 engines, not just Postgres.

See how branching works

Everything a MySQL database should ship with

The same primitives on every MySQL database: TLS, web console, hibernation, and a real dashboard. The rows that need a paid plan say so on the row; nothing here is hidden behind a sales call.

Web IDE

Query console in the dashboard, no extra client to install.

Included

TLS by default

All connections encrypted. No setup required.

Included

Always-on connections

Pin a database to your plan's always-on pool so it never hibernates. Free has no pool, so a free database always sleeps when idle; Solo includes 768 MB of pool and Pro 1.5 GB.

Included, Paid plans

Scale to zero

Hibernates when idle. Wakes on the next connection.

Included

Connection pooling

Pooled endpoint for serverless and edge workloads.

Included

Direct connections

Bypass the pooler for migrations and replication.

Included

Native HTTPS endpoint

Engines whose own wire protocol speaks HTTPS. Every database, including this one, is also queryable over the platform's HTTPS query API and web console.

Not available

Serverless driver

Drop-in HTTP driver for edge runtimes (Neon serverless, PlanetScale, Upstash REST, or the engine-native client).

Included

IP whitelisting

Restrict access to specific IPs or CIDR ranges.

Included

Automatic backups

Scheduled dumps and volume snapshots with one-click restore on paid plans. Free includes 1 manual backup slot you take and restore yourself.

Included, Scheduled: paid plans

What MySQL costs on Layerbase

Plans are flat. There is no per-hour compute meter, no per-database line item, and no ingress or egress fee, so the bill does not change shape when your traffic does. You do not need an AWS, GCP, or Azure account either: Layerbase runs the infrastructure.

Solo$5/mo

The database you pin never sleeps.

Pro$15/mo

Every engine, plus a bigger always-on pool.

Hosted MySQL, compared

PlanetScale

Free tier
None; PlanetScale does not offer a free plan
Billing
PS-5 at $5/mo for a single node, $15/mo for a three-node high-availability cluster

Layerbase

Free tier
MySQL from Solo at $5/mo; MariaDB, a wire-compatible drop-in, is on the Free tier
Billing
$5 or $15/mo flat. No meters.

Competitor facts verified September 7, 2026 against each vendor's own pricing and documentation pages: PlanetScale.

Already have data? Migrate it from Railway, PlanetScale, DigitalOcean, and more Any connection string works too.

More on MySQL

All articles

MySQL is developed by the MySQL project. Layerbase packages and hosts official releases; the engine itself is built upstream.

mysql.com