> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# PlanetScale

> Read-only SQL against your PlanetScale database.

Go to **Connections**, click **Connect** next to PlanetScale, and enter the host, database name, username, and password. Create a **read-only** password for the branch in PlanetScale first.

If your PlanetScale Postgres database is only reachable from your private network, turn on **SSH tunnel** to connect through a bastion host: a public one, or an EC2 instance behind an EC2 Instance Connect Endpoint. See [SSH tunnels](/integrations/ssh-tunnels) for setup. Ordyn still verifies PlanetScale's TLS certificate through the tunnel. Tunnels work with the Postgres engine only, not Vitess (MySQL).

## Permissions

Create a read-only credential (Postgres: a role inheriting pg\_read\_all\_data; Vitess: a password with the reader role) and provide its host, database, username and password.

### Read-only queries

Answer data questions during investigations and measure the impact of open issues.

| Role | Used for |
| - | - |
| `reader` | Vitess (MySQL) password role |
| `pg_read_all_data` | Postgres engine: the role Ordyn's role inherits |

* On the Postgres engine, `pg_read_all_data` reads every table in every database on the branch. To limit Ordyn to the schemas you choose, create the role without it and grant USAGE and SELECT on those schemas, as in the PostgreSQL setup.

### How to grant

> **Vitess (MySQL): create a read-only password**
>
> ```bash theme={null}
> pscale password create <database> main struct-reader --role reader
> ```

> **Postgres: create a read-only role**
>
> ```bash theme={null}
> pscale role create <database> main struct-reader --inherited-roles pg_read_all_data
> ```

Replace the values in angle brackets.

Permission catalog version `2026-10-16.1`. See [permission changes](/reference/permission-changes).

## What Ordyn does with it

Answers data questions during investigations and measures the impact of [open issues](/open-issues/overview) with live queries you can inspect.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.