# Databases

> Spin up a managed MySQL, PostgreSQL, or Redis database in seconds. Every database runs in its own hardened container with dedicated resources, and is...

Source: https://fadehost.com/docs/databases/

Spin up a managed **MySQL**, **PostgreSQL**, or **Redis** database in seconds. Every database runs in its own hardened container with dedicated resources, and is **private by default**, reachable over your FadeHost private network by your game servers, bots, and your own devices, with an optional public endpoint.

Find it under **Databases** in your control panel.

## Creating a database

1. Go to **Databases → New database**.
2. Choose:
   - **Name:** a label.
   - **Engine:** MySQL 8, PostgreSQL 17, or Redis 7.
   - **Region:** pick the location closest to whatever will use it.
   - **Public access:** leave **off** for private-only (recommended), or turn it **on** to also get a public host:port.
3. Click **Create**. Your database is ready in moments.

## Connecting

Open a database and click **Connect** for its credentials. You always get a **private** connection, plus a **public** one if you enabled public access.

### Private (recommended)

The private endpoint is a hostname on your FadeHost private network (for example `db-abc123`). Anything else of yours on that network connects to it directly, with **no public exposure at all**: a game server, a hosted bot, your VPS, or [your own laptop](/docs/private-network/). This is the safest way to connect and has the lowest latency when the consumer is in the same region.

**Your game servers and Discord bots join your private network automatically.** Once you have a database (or a VPS or bot, since any of them [activates the network](/docs/private-network/)), they connect the next time they start, so if a server or bot was already running when you created your first database, restart it once and the private hostname will resolve from inside it.

### Public

If you enabled public access, you also get a `host:port` reachable from anywhere. Use it for tools like DBeaver, TablePlus, or `mysql`/`psql` from your machine. Because it's internet-facing, use a strong password (we generate one) and treat the credentials carefully.

### Connecting from your desktop

To browse and edit your database from your computer, we recommend **[TablePlus](https://tableplus.com/)**, a clean, native GUI for macOS, Windows, and Linux that supports MySQL, PostgreSQL, and Redis.

1. Turn on **Public access** for the database, either when you create it or later from **Manage → Public access** (the database restarts briefly). This gives you a public `host:port`.
2. Open **TablePlus → Create a new connection →** pick your engine (MySQL / PostgreSQL / Redis).
3. Fill in the details from the **Connect** dialog:
   - **Host:** the public host
   - **Port:** the public port
   - **User:** `root` (MySQL) or `postgres` (PostgreSQL)
   - **Password:** from the Connect dialog (click *Reveal*)
   - **Database:** the database name shown
4. Click **Connect**.

Other clients work too: **DBeaver**, **HeidiSQL**, or the `mysql` / `psql` / `redis-cli` command-line tools using the same details.

> **Private-only databases** (public access off) aren't reachable from a normal desktop: they only accept connections from your own FadeHost private network. That's the most secure setup for a database used solely by your game servers and bots. To connect from your own machine, either [join it to your private network](/docs/private-network/) (recommended, since nothing gets exposed) or enable public access.

### Connection strings

Each engine gives you both the individual fields and a ready-to-use URL:

```
# MySQL
mysql://root:PASSWORD@db-abc123:3306/fhabc123

# PostgreSQL
postgresql://postgres:PASSWORD@db-abc123:5432/fhabc123

# Redis
redis://:PASSWORD@db-abc123:6379
```

Drop the URL straight into your app's `DATABASE_URL` (or `REDIS_URL`) environment variable.

## Managing

Click **Manage** on a database to open its page: live **memory / CPU / storage** usage, connection details, **Start/Stop**, the **Public access** toggle, **Backups**, a **query console**, and deletion. Deleting a database **permanently destroys its data**, so take a backup or export first.

- **Console.** Run SQL (or Redis commands) straight from the panel: `SHOW TABLES;`, a quick `SELECT`, `\dt`, `INFO keyspace`. Handy for checking what a plugin wrote without connecting a desktop client.
- **Reset password:** one click generates a new root password and applies it to the engine. Anything using the old password disconnects until you update it.

### Storage quotas

Each plan includes a storage allowance (see the table below). The Manage page shows your usage; at **85%** you get a warning, and at **100%** the database is stopped automatically to protect the host, so delete data or upgrade the plan, then start it again. Backups don't count against the quota (they live in your encrypted backup vault).

## Backups & rollback

From **Manage → Backups** you can protect your data and roll back mistakes:

- **Back up now** takes a consistent snapshot of your data (a proper `mysqldump` / `pg_dump` / Redis snapshot, safe while the database is in use) and stores it **encrypted, off-node** in redundant object storage.
- **Restore** rolls the database back to a chosen backup. Everything written after that backup is replaced, so the panel asks you to confirm. MySQL and PostgreSQL restore in place; Redis restarts briefly during a rollback.
- **Delete** removes a backup you no longer need.

Backups belong to your account's encrypted backup vault, the same one that protects your game-server backups.

## Plans

| | Free | Starter | Standard | Pro |
| --- | --- | --- | --- | --- |
| Price / month | $0 | $2 | $4 | $8 |
| RAM | 512 MB | 1 GB | 2 GB | 4 GB |
| vCPU | 0.5 | 0.5 | 1 | 2 |
| Storage | 5 GB | 10 GB | 20 GB | 40 GB |
| MySQL · PostgreSQL · Redis | Yes | Yes | Yes | Yes |
| Private network + public endpoint | Yes | Yes | Yes | Yes |
| Backups & rollback | Yes | Yes | Yes | Yes |
| Per account | 1 (verified email) | Multiple | Multiple | Multiple |

Your first database is **free** and included with your account. Add more, or larger tiers, from **Databases** in the plan builder. Yearly billing gets 2 months free.

A dedicated database starts at **$2/mo**, against DigitalOcean's $15, PlanetScale's $39, or Aiven's $5+, and it comes with an always-on free tier, flat pricing (no usage bills), and a private network to your servers. Every database runs sandboxed with hard memory and CPU limits, on the same infrastructure that powers your game servers.

## Need help?

Join our [Discord](https://discord.gg/t4Hy4X5tEq) and we'll help you get connected.
