docs/docs/en/api/cli/db/index.md
Inspect or manage CLI-managed built-in databases. For envs without a CLI-managed database container, nb db ps can also show external or remote status.
nb db <command>
| Command | Description |
|---|---|
nb db check | Check whether a database connection is reachable. |
nb db ps | View built-in database runtime status |
nb db start | Start the built-in database container |
nb db stop | Stop the built-in database container |
nb db logs | View built-in database container logs |
nb db check --env app1
nb db check --db-dialect postgres --db-host 127.0.0.1 --db-port 5432 --db-database nocobase --db-user nocobase --db-password secret
nb db ps
nb db ps --env app1
nb db start --env app1
nb db stop --env app1
nb db logs --env app1