Databases 1 service 1 GiB RAM 10 GB disk

MySQL

The world`s most popular open-source database, as a single self-hosted node on a flat plan.

One-click deploy, from $7/mo on a Miget plan.

MySQL is the most widely deployed open-source relational database, behind a huge share of web apps and frameworks. This template is a single MySQL 8.4 LTS node, configured entirely through the official image`s environment variables, with data on a volume and an app database and user created on first boot.

It runs internal-only on Miget - apps in the same project connect at mysql:3306. Miget also offers managed MySQL as an addon (backups and failover handled for you), which is the better choice for most apps; this template is for full control of the version and configuration.

For high availability, the catalogue has mysql-innodb-cluster (Group Replication) and percona-xtradb-cluster (synchronous multi-primary); for the MariaDB fork, see the mariadb templates.

#what you get

  • MySQL 8.4 LTS, the standard relational database
  • Configured entirely by environment variables
  • App database + user created on first boot
  • Internal-only - reached at mysql:3306
  • Data on a volume
  • GPLv2

#topology

ServiceRolePublic
mysqlrelational database (:3306)no (internal)

#miget sizing

// this stack needs

1 GiB RAM · 10 GB disk · 1 service

1 GiB suits small-to-medium workloads; raise RAM for larger buffer pools. A single node is not HA - see mysql-innodb-cluster or percona-xtradb-cluster.

Hobby - recommended fit

$7/mo

1 vCPU · 1 GiB · 25 GiB disk

Headroom for your own apps: 2 GiB at $13/mo

Professional - production

$22/mo

1 vCPU · 2 GiB · 10 GiB disk

Dedicated resources, production SLOs - plan details

One Miget plan is a fixed pool of compute - the whole stack (managed databases included) deploys inside it, and anything left over runs your other apps. No per-service or per-seat math.

#vs. the managed service

What the hosted equivalents charge, against the flat Miget plan this stack fits on. Prices as of June 2026, sources linked.

ServicePlanMonthlyWhat you get
MySQL on Miget 1 GiB plan$7this whole stack, flat - no usage meters, and room left for your own apps
AWS RDSdb.t4g.micro~$15smallest single-AZ instance/mo + storage
PlanetScaleScaler~$39from $39/mo, then usage-based

Managed MySQL bills per instance (and per AZ for HA) plus storage/transfer; this is one flat plan.

#vs. other PaaS

Estimated monthly cost of running this exact stack (1 GiB RAM, 10 GB disk, 1 container) elsewhere, from published June 2026 rates.

PlatformEst. monthlyNotes
Miget $7 flat compose stacks first-class: one deploy, dedicated vCPU, managed Postgres/Valkey, volumes and TLS all included in the plan
Heroku ~$50 no volumes; nothing between 1 GB ($50) and 2.5 GB ($250) dynos - 2 GB containers cost far more than shown
DO App Platform ~$17 no persistent volumes - stateful containers need managed DBs/Spaces (base $5 Spaces included here)
Render ~$15 per-service instances (0.5 GB $7, 2 GB $25) - every container is its own paid service
Railway ~$12 usage-based ($10/GB RAM-mo); vCPU billed separately at $20/vCPU-mo on top
Fly.io ~$7 cheapest sticker price - but burstable shared CPUs (1/16 core; dedicated vCPUs cost ~2-3×), no compose deploys (one app per container, manual wiring), managed DBs billed extra

Estimates assume RAM fully allocated at published on-demand rates - and sticker price isn't the whole comparison: the cheaper rows buy burstable shared CPUs, per-service wiring instead of a compose deploy, and managed databases billed separately. Heroku and DO App Platform have no persistent volumes at all - stateful stacks like this one need workarounds there.

#deploy it

On Miget

  1. Create a Compose Stack in app.miget.com pointing at the templates repository
  2. Set the stack path to mysql
  3. Set the required variables:
    • MYSQL_ROOT_PASSWORD, root password
    • MYSQL_PASSWORD, password for the app user
  4. Deploy. Miget layers compose.miget.yaml (RAM, privacy, volumes, managed services) automatically

Locally first?

Every template is portable, vanilla Docker Compose - the Miget overrides are ignored locally:

git clone https://github.com/deployable-sh/stacks
cd miget-compose-templates/mysql
docker compose up -d

Same files, same behavior. The template README covers connection strings and scaling notes.

#faq

Should I use this or managed MySQL?

For most apps, managed MySQL is less to operate (backups, failover, upgrades handled for you). Use this template when you need a specific version, custom configuration, or a private in-project database you fully control.

What does this save vs RDS?

AWS RDS for MySQL starts around $15/month for the smallest instance and roughly doubles for Multi-AZ, plus storage and transfer. This is one flat plan on your own infrastructure.

How do I get high availability?

A single node has a single point of failure. For HA use mysql-innodb-cluster (Group Replication with automatic failover) or percona-xtradb-cluster (synchronous multi-primary).

Ship MySQL today

One compose stack, 1 GiB of RAM, from $7/month flat, and it runs on your laptop with the same files.