• Home
  • Blog
  • About

PlanetScale useful terminal commands

January 01, 2022

All info is written for MacOS bash terminal.

to install command line

brew install planetscale/tap/pscale

to show organization related commands:

pscale org

To switch to another organization in PlanetScale using terminal:

pscale org switch ORGANIZATION_NAME

to connect to your databases locally:

pscale connect DATABASE_NAME BRANCH_NAME --port 3309

example to connect to dev and shadow branches locally in test-org:

pscale connect test-org test-dev --port 3309
pscale connect test-org test-shadow --port 3310

do not forget to turn on copying migration data:

Turn on copying migration data