Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Connect To Multiple Branches From The PlanetScale CLI

Run the planetscale cli multiple times to connect to different branches:

Code

# Terminal 1
pscale connect your-database main

Code

# Terminal 2
pscale connect your-database another-branch

The first connection will use port `3306` if it's available or another random port if it's not.

The second connection will use a random port either way.

When the connection is made, the port being used will be output. Fill it in like the following:

Code

host: 127.0.0.1
port: (whatever port number shows up on the command line)
database: (your database name)
username: root
password: (leave blank)