MySQL
Tick MySQL on an app and Railyard creates a database, a user, and injects the connection details before the next build runs. Here is exactly what that gives you, what gets backed up, and how to reach it from outside.
What you get
- MySQL 8 (mysql:8), one database and one user per app (app_<id>), created with CREATE DATABASE and CREATE USER and granted privileges on its own database plus any pattern-matched extra databases the app declares.
- Scheduled backups every 24 hours by default, each one confirmed by restoring it. At least the 7 most recent are always kept, and anything older than 30 days outside that set is pruned; both numbers are configurable per database.
- A standby on a second database server (Pro and Team) keeps a live copy and takes over automatically if the primary stops answering for 3 minutes, the same mechanism as Postgres.
- No point-in-time recovery for MySQL, that's Postgres-only.
- MariaDB is available as a drop-in alternative from the templates catalog if you want the same wire protocol under a community-governed fork.
How to add it
- 1
Tick MySQL when you create the app
On New app, or later from Edit → Add-ons, check MySQL and deploy. Railyard injects DATABASE_URL, DATABASE_HOST, DATABASE_PORT, DATABASE_NAME, DATABASE_USER and DATABASE_PASSWORD before the build runs.
- 2
Or add it from the CLI
railyard apps create <name> <git-url> --addons mysql does the same thing from a terminal.
- 3
Connect from your own machine
Open Trusted addresses on the database card and allow your IP. Railyard opens a TCP proxy for that one address; any MySQL client can then reach it with the same password, and the card gives you the exact command to paste.
A one-click example
Ghost is a full publishing platform that expects MySQL out of the box, a direct example of an app running against the add-on instead of an empty database with nothing pointed at it.
Or deploy a standalone instance deploys a standalone MySQL instance with nothing else attached, if that's all you need.