Getting Started
Make sure to first set up your PlanetScale developer environment. Once you’ve installed thepscale 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 connect command
This command creates a secure connection to a database branch for a local client. It is supported for Vitess/MySQL databases only; to connect to a Postgres database, use a connection string with a role.
Usage:
<BRANCH_NAME>.
Available flags
Available roles for the
--role flag are:
readerwriterreadwriteradmin
Global flags
Examples
The connect command with --execute flag
Command:
node app.js command. Since no --execute-env-url flag was passed, it uses the default DATABASE_URL environment variable. You can find a full example of this in our Node quickstart.

