planetscale.com
Open in
urlscan Pro
76.76.21.21
Public Scan
URL:
https://planetscale.com/docs/reference/database
Submission: On March 13 via api from US — Scanned from DE
Submission: On March 13 via api from US — Scanned from DE
Form analysis
2 forms found in the DOM<form class="focus-within-ring items-stretch rounded-xs border border-secondary text-primary shadow-sm inline-flex"><label for="theme"
class="mb-0 flex items-center whitespace-nowrap rounded-l-xs border-r border-secondary bg-secondary px-1.5 py-1 text-sm font-medium">Theme</label><select
class="rounded-xs border-secondary bg-transparent py-1 pr-4 text-sm font-normal transition autofill:bg-white focus:border-blue-500/50 focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-transparent hover:focus:border-blue-500/50 block w-full rounded-l-none rounded-r-xs border-0 pl-2 !shadow-none !ring-0"
name="theme" id="theme">
<option value="system" selected="">System</option>
<option value="light">Light</option>
<option value="dark">Dark</option>
</select></form>
<form class="focus-within-ring items-stretch rounded-xs border border-secondary text-primary shadow-sm inline-flex"><label for="theme"
class="mb-0 flex items-center whitespace-nowrap rounded-l-xs border-r border-secondary bg-secondary px-1.5 py-1 text-sm font-medium">Theme</label><select
class="rounded-xs border-secondary bg-transparent py-1 pr-4 text-sm font-normal transition autofill:bg-white focus:border-blue-500/50 focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-transparent hover:focus:border-blue-500/50 block w-full rounded-l-none rounded-r-xs border-0 pl-2 !shadow-none !ring-0"
name="theme" id="theme">
<option value="system" selected="">System</option>
<option value="light">Light</option>
<option value="dark">Dark</option>
</select></form>
Text Content
This website stores cookies on your computer. We use this information to improve your browsing experience and for analytics about our visitors both on this website and other media. To learn more about the cookies used, see our Privacy Policy. Cookies settings Accept All Decline All Skip to content * Products * Solutions * Resources * DocumentationDocs * Pricing * Contact Sign inGet started * Products * Solutions * Resources * Documentation * Pricing * Contact Menu Return to documentation home Return to documentation home Getting started Importing a database Reading and writing data Making schema changes Monitoring your database Backing up your database Scaling your database Caching queries Security and access API pscale CLI CLI overview Using the pscale CLI Setting up CLI environmentService tokens CLI command reference apiaudit-logauthbackupbranchcompletionconnectdatabasedeploy-requestorgpasswordpingregionservice-tokenshellsignup Using CI/CD with your database Extracting data from your database PlanetScale for Enterprises Plans and billing ThemeSystemLightDark Return to documentation home Getting started Importing a database Reading and writing data Making schema changes Monitoring your database Backing up your database Scaling your database Caching queries Security and access API pscale CLI CLI overview Using the pscale CLI Setting up CLI environmentService tokens CLI command reference apiaudit-logauthbackupbranchcompletionconnectdatabasedeploy-requestorgpasswordpingregionservice-tokenshellsignup Using CI/CD with your database Extracting data from your database PlanetScale for Enterprises Plans and billing ThemeSystemLightDark PLANETSCALE CLI COMMANDS: DATABASE Use the PlanetScale CLI “database” command to create, read, delete, dump, and restore databases from your terminal. 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 DATABASE COMMAND This command allows you to create, read, delete, dump, and restore databases. Usage: Terminal pscale database <SUB-COMMAND> <FLAG> AVAILABLE SUB-COMMANDS Sub-commandSub-command flagsDescriptioncreate <DATABASE_NAME>--region <REGION_NAME>, --plan <PLAN>, --cluster_size <CLUSTER_SIZE>Create a database with the specified namedelete <DATABASE_NAME>--forceDelete the specified databasedump <DATABASE_NAME> <BRANCH_NAME>--local-addr <ADDRESS>, --output <DIRECTORY_NAME>, --tables <TABLES_LIST>Backup and dump the specified databaselist <DATABASE_NAME>List all databases in the current orgrestore-dump <DATABASE_NAME> <BRANCH_NAME>--dir <DIRECTORY_NAME>*, --local-addr <ADDRESS>, --overwrite-tablesRestore the specified database from a local dump directoryshow <DATABASE_NAME>--webRetrieve information about a database > * Flag is required 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. Sub-command flagDescriptionApplicable sub-commands--regionSpecify the region of the new database. Default is us-east.create--planSpecify the plan for the databas. Currently, scaler_pro is the only option and the default.create--cluster_sizeFor Scaler Pro databases, you may specify the cluster size. Default is PS_10create--forceDelete a database without confirmation.delete--local-addr <ADDRESS>Local address to bind and listen for connections. By default the proxy binds to 127.0.0.1 with a random port.dump, restore-dump--output <DIRECTORY_NAME>Output directory of the dump. By default the dump is saved to a folder in the current directory.dump--tables <TABLES_LIST>Comma separated string of tables to dump. By default, all tables are dumped.dump--wheres stringComma separated string of WHERE clauses to filter the tables to dump.dump--replicaDump from a replica (if available; will fail if not).dump--dir <DIRECTORY_NAME>Directory containing the files to be used for the restore.restore-dump--overwrite-tablesIf true, will attempt to DROP TABLE before restoring.restore-dump--webPerform the action in your web browsershow AVAILABLE FLAGS FlagDescription--hGet help with the database command--org <ORGANIZATION_NAME>Specify the organization for the database you're acting upon GLOBAL FLAGS CommandDescription--api-token <TOKEN>The API token to use for authenticating against the PlanetScale API.--api-url <URL>The base URL for the PlanetScale API. Default is https://api.planetscale.com/.--config <CONFIG_FILE>Config file. Default is $HOME/.config/planetscale/pscale.yml.--debugEnable debug mode.-f, --format <FORMAT>Show output in a specific format. Possible values: human (default), json, csv.--no-colorDisable color output.--service-token <TOKEN>The service token for authenticating.--service-token-id <TOKEN_ID>The service token ID for authenticating. EXAMPLES CREATE A NEW SCALER_PRO DATABASE Command: Terminal pscale database create new-database --region <REGION_NAME> --plan scaler_pro --cluster_size PS_80 Output: Database new-database was successfully created. NEED HELP? Get help from the PlanetScale support team, or join our GitHub discussion board to see how others are using PlanetScale. Was this page useful? YesNo Last updated on July 13, 2023Help us improve this page COMPANY * About * Blog * Changelog * Careers PRODUCT * Case studies * Enterprise * Pricing * AI/ML RESOURCES * Docs * Resources * MySQL for Developers * Support * Status OPEN SOURCE * Vitess * Vitess community * GitHub TALK TO US * Call +1 408 214 1997 * Contact us © 2024 PlanetScale, Inc. All rights reserved. PrivacyTermsCookiesDo Not Share My Personal Information