db
scloud db provides commands for managing your Serverpod Cloud database for projects that have the database enabled.
Get DB connection details​
To get the connection details for connecting directly to the database, run the the db connection subcommand:
scloud db connection
Create a new superuser​
To create a new superuser for directly accessing the database, run the the db user create subcommand:
scloud db user create my_new_username
Save the printed password in you password manager. It cannot be retrieved again.
Reset a DB user password​
To reset the password for a database user, run the the db user reset-password subcommand:
scloud db user reset-password my_new_username
Usage​
Manage Serverpod Cloud DBs.
Usage: scloud db <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
connection Show the connection details for a Serverpod Cloud DB.
user Manage database users.
Danger Zone
wipe Irreversibly wipe and recreate the database, deleting all data and schema changes.
Run "scloud help" to see global options.
See the full documentation at: https://docs.serverpod.cloud/reference/cli/commands/db
Sub commands​
connection​
Show the connection details for a Serverpod Cloud DB.
Usage: scloud db connection [arguments]
-h, --help Print this usage information.
-p, --project (mandatory) The ID of the project.
Can be omitted for existing projects that are linked. See `scloud
project link --help`.
Run "scloud help" to see global options.
See the full documentation at: https://docs.serverpod.cloud/reference/cli/commands/db
user​
Manage database users.
Usage: scloud db user <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
create Create a new superuser in the Serverpod Cloud DB.
reset-password Reset a password in the Serverpod Cloud DB.
Run "scloud help" to see global options.
See the full documentation at: https://docs.serverpod.cloud/reference/cli/commands/db
wipe​
Irreversibly wipe and recreate the database, deleting all data and schema changes.
Usage: scloud db wipe [arguments]
-h, --help Print this usage information.
-p, --project (mandatory) The ID of the project.
Can be omitted for existing projects that are linked. See `scloud
project link --help`.
Run "scloud help" to see global options.
See the full documentation at: https://docs.serverpod.cloud/reference/cli/commands/db