Skip to main content
squarecloud db manages the MongoDB, MySQL, PostgreSQL and Redis databases of your account. It also works as squarecloud database. Databases have no configuration file, so [dbID] is either the ID you pass or, when you omit it in a terminal, a picker of your databases. Find IDs with squarecloud db list.

squarecloud db create

Usage
All four flags are required: without them, the command prints its help. Creating a database needs a Standard, Pro or Enterprise plan.
Output
The password is shown only once. db info doesn’t show it again; if you lose it, rotate it with db credentials reset password.
With --json, it prints the created database, password and connection URL included, as JSON.

squarecloud db list

Usage
Prints the name, ID, engine, memory and cluster of every database in your account.

squarecloud db info

Usage
Shows the database ID, name, engine, memory, port, cluster, owner and creation date.

squarecloud db update

Usage
Renames the database or changes its memory. Pass at least one of the two flags: without them, the command prints its help.

squarecloud db start

Usage
Starts a stopped database. If it is already running, the CLI says so (It is already running.) and exits with code 0.

squarecloud db stop

Usage
Stops a running database. If it is already stopped, the CLI says so (It is already stopped.) and exits with code 0.

squarecloud db status

Usage
Prints the database ID, CPU usage, memory, disk and status.

squarecloud db metrics

Usage
Prints the last 24 hours of the database’s CPU usage, RAM usage and network traffic, one row per 5-minute data point.

squarecloud db credentials certificate

Usage
Prints the database’s TLS certificate, which clients use to connect over TLS.

squarecloud db credentials reset

Usage
Rotates the password or the TLS certificate, after a y/N confirmation. The old one stops working immediately, so update every client that uses it. A new password is printed once; after rotating the certificate, get the new one with db credentials certificate.

squarecloud db delete

Usage
Deleting a database is permanent. To keep a copy of the data, run squarecloud db snapshot create --download first.
Asks Delete the database <dbID>? This action is irreversible [y/N] before deleting. Snapshots of databases are on Snapshots.