Skip to main content

Getting Started

Make sure to first set up your PlanetScale developer environment. Once you’ve installed the pscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.

Postgres

Create role credentials with pscale role, then connect using a connection string.pscale connect is not supported.

Vitess / MySQL

Create a branch password with pscale password, then connect with a connection string or pscale connect.

The password command

Manage database passwords for a Vitess database branch. This command is only supported for Vitess databases. To manage a role for Postgres, see the role command. Usage:

Available sub-commands

Service token automation: password

Legend: ✅ supported · Vitess only. All sub-commands require --org or PLANETSCALE_ORG.
Setup and commands to avoid: CLI overview · Service tokens The value <PASSWORD_ID> represents the ID number of the set of credentials. To find all available credentials and their IDs, run pscale list <DATABASE_NAME> <BRANCH_NAME>.

Sub-command flag descriptions

Some of the sub-commands have additional flags unique to the sub-command. This section covers what each of those does. See the above table for which context. Available roles for the --role flag are:
  • reader
  • writer
  • readwriter
  • admin

Available flags

Global flags

Examples

The delete sub-command

Delete a password from a database branch: Command:
Output:

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.