db
scloud db
provides commands for managing your Serverpod Cloud database for projects that have the database enabled.
Create a new superuser
To create a new superuser for directly accessing the database, run the the db create-superuser
subcommand:
scloud db create-superuser my_new_username
Save the printed password in you password manager. It cannot be retrieved again.
Get DB connection details
To get the connection details for connecting directly to the database, run the the db connection
subcommand:
scloud db connection
Reset a DB user password
To reset the password for a database user, run the the db reset-password
subcommand:
scloud db 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.
create-superuser 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/references/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/references/cli/commands/db
create-superuser
Create a new superuser in the Serverpod Cloud DB.
Usage: scloud db create-superuser [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`.
--username (mandatory) The username of the DB user to create.
Run "scloud help" to see global options.
See the full documentation at: https://docs.serverpod.cloud/references/cli/commands/db
reset-password
Reset a password in the Serverpod Cloud DB.
Usage: scloud db reset-password [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`.
--username (mandatory) The username of the DB user to create.
Run "scloud help" to see global options.
See the full documentation at: https://docs.serverpod.cloud/references/cli/commands/db