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.

The vtctl command

Run Vitess vtctld operations against a Vitess database branch. Commands mirror Vitess vtctldclient where possible. Usage:
pscale branch vtctld is an alias for pscale branch vtctl. Most subcommands print JSON. Pass --format json when you script them so progress messages don’t mix with the JSON.

Available sub-commands

Flags shared by many sub-commands

Global flags

List tablets

Discover tablet aliases:
Matching API: GET /v1/organizations/:org/databases/:db/branches/:branch/tablets.

Shard tablet controls

Use get-shard to inspect tablet controls and denied tables. Use set-shard-tablet-control only for an emergency fix or after a finished MoveTables workflow — the same guidance as Vitess SetShardTabletControl.
Service tokens need write_branch_topology for development branches and write_production_branch_topology for production branches to update shard tablet controls. The same accesses apply to PlannedReparentShard.
* Flag is required
You must pass at least one of --remove, --denied-tables, or --disable-query-service. Matching APIs: GET .../vtctld/shard, PUT .../vtctld/shard/tablet-control, POST .../vtctld/shard/refresh-state.

Dashboard

The Workflows page lists MoveTables and Materialize workflows and is read-only. Create and drive them with the CLI or API. See Workflows.

Need help?

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