Skip to main content
PlanetScale’s MySQL databases (Vitess) aren’t supported: ask for them with Request a source. PlanetScale Postgres connects, with one trap: it routes each login to a branch by its user name (<role>.<branch id>), and Midplane’s switch logs in as the role’s name alone. So use a read-only role from PlanetScale’s dashboard instead of the role script.
1

Make a read-only role

On the branch you want, create a role with pg_read_all_data as its only permission, and copy its credentials (PlanetScale’s roles).
2

Write the connection string

Use the direct port, 5432, and the user as PlanetScale gives it:
To read a replica, add |replica to the user. sslrootcert shows as Ignored, which is fine.
3

Let Midplane in, if IP restrictions are on

Under Settings, IP restrictions, add both of your region’s egress addresses (PlanetScale’s IP restrictions).
PlanetScale’s certificates come from a public authority: TLS verified, and the role shows Reads only.
Don’t run the role script: it makes a role Midplane can’t switch to. Paste the read-only role’s string under Credentials and select Test and replace.