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.
Tables
- users
- events
- orders
- sessions
| id | name | created_at |
|---|---|---|
| 1247 | signup | 2026-03-12 14:21 |
| 1246 | purchase | 2026-03-12 14:08 |
| 1245 | login | 2026-03-12 13:55 |
| 1244 | signup | 2026-03-12 13:44 |
| 1243 | purchase | 2026-03-12 13:30 |
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
Branching and edge access
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 accesslbase cloud branch app-db pr-482
lbase cloud branch ls app-db
lbase cloud branch delete app-db pr-482Quick start
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
mysql --ssl-mode=REQUIRED -h your-host.cloud.layerbase.dev -P <port> -u layerbase -p app
Where to run it
Cloud, desktop, or self-host
One database, three places it can live. Pick the speed you want and move between them when you outgrow it.
Managed MySQL hosting
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.
MySQL needs the Solo plan, $5/mo flat. Pro is $15/mo. MariaDB is the free wire-compatible alternative.
FAQ
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 LayerbaseWhat 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 worksWhat you get
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.
TLS by default
All connections encrypted. No setup required.
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.
Scale to zero
Hibernates when idle. Wakes on the next connection.
Connection pooling
Pooled endpoint for serverless and edge workloads.
Direct connections
Bypass the pooler for migrations and replication.
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.
Serverless driver
Drop-in HTTP driver for edge runtimes (Neon serverless, PlanetScale, Upstash REST, or the engine-native client).
IP whitelisting
Restrict access to specific IPs or CIDR ranges.
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.
What it costs
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.
The database you pin never sleeps.
Every engine, plus a bigger always-on pool.
Side by side
Hosted MySQL, compared
| Provider | Free tier | Billing |
|---|---|---|
| PlanetScale | None; PlanetScale does not offer a free plan | PS-5 at $5/mo for a single node, $15/mo for a three-node high-availability cluster |
| Layerbase | MySQL from Solo at $5/mo; MariaDB, a wire-compatible drop-in, is on the Free tier | $5 or $15/mo flat. No meters. |
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- September 18, 2026
MariaDB 13.0 and 12.3 LTS on Layerbase: which line to pick
MariaDB 13.0 and 12.3 are now offered on Layerbase alongside 10.11, 11.4 and 11.8, and the older lines have been refreshed to their current patches. Here is what actually shipped in 13.0, what 12.3 changed, why one of them is the LTS and the other is not, and what happens to databases already on 11.8 (nothing).
Read - September 5, 2026
Northflank alternatives: a preview environment is not a database branch
Northflank gives every pull request its own stack, and the database in that stack starts empty unless you seed it or restore it from a backup you already had. Here is exactly how their forks work, what a copy-on-write branch does differently, what each one costs while a PR sits open, and the cases where Northflank is the right answer.
Read - August 26, 2026
Aiven alternatives: one plan instead of one bill per service
Aiven prices every service on its own hourly meter, so a Postgres plus a MySQL plus a Valkey is three plans and three line items, at three different prices. Here is the arithmetic against a flat Layerbase plan, the real shape of both free tiers, and the four things Aiven does that we do not do at all.
Read - August 23, 2026
Free MySQL hosting: start on MariaDB, upgrade to MySQL when you need it
MySQL is not on the Layerbase free tier and MariaDB is, and they speak the same wire protocol. Here is the dump command that survives a restricted source account, every error the restore actually throws, what MySQL keeps that MariaDB does not, and the route back to real MySQL later.
Read - August 22, 2026
Moving a MySQL database off cPanel shared hosting
Your database is on a shared host that binds MySQL to localhost, runs a version you did not pick, and keeps the only backup. Here is the whole move: getting a dump that is actually complete, landing it on managed MariaDB, repointing the app, and the parts of shared hosting you will genuinely miss.
Read
Upstream project
MySQL is developed by the MySQL project. Layerbase packages and hosts official releases; the engine itself is built upstream.