database family manages the records and inspects a registered database. database:server runs a MySQL server as a Docker Node Process and keeps its root password in the Gateway. Database servers describes the servers.
Database connections describes the driver fields, the API, inspection, and the keys that an attachment writes. Attach a connection to an Instance with instance:database:add.
Commands
Every command accepts
--json, and every result includes the request ID. No output contains a password; has_password shows whether one is stored. database:destroy asks for confirmation, and the default is No. JSON and piped calls need --force.
orbit database:create
Register an existing database, or create a new one on a Database server. The Gateway encrypts the password before it writes the row.validation.failed when a mysql, pgsql, or redis record includes --path, when a sqlite record includes --host, --port, or --database, when a redis record omits --host, or when the request includes an unsupported field. A duplicate slug returns database.slug_conflict and leaves the existing record unchanged.
Query, tables, schema, and describe refuse a redis connection with database.driver_unsupported. An Instance gets the stored --host and --port unchanged, also on the --node Node. Use an address that every Instance can reach, such as the database Node’s WireGuard address.
orbit database:list
List every registered connection ordered by slug.orbit database:show
Show one connection with its driver, Node association, host, port, database, path, username,has_password, and the recorded user count.
orbit database:update
Replace the supplied fields on one connection. The command requires at least one field option and accepts the same field options asdatabase:create.
instance:database:add again with the same prefix to re-project them, then env:sync to install them.
orbit database:server:create
Run a MySQL server as a Docker Node Process. Orbit generates the root password and keeps it only in the Gateway.orbit database:server:list
List the servers with their slug, Node, tag, port, status, and number of databases.orbit database:server:show
Show one server and the databases on it.orbit database:server:destroy
Remove a server. The Gateway refuses withdatabase.server_in_use while a connection points to it. It keeps the data volume.
orbit database:user:create
Add a user to a database on a server, for example a read-only user in production.database.server_required. The user of a connection on the same server returns database.name_conflict. Creating the same user again sets its password and privileges. The Gateway stores the password encrypted, so it can publish it to Vaultwarden. No response returns it.
orbit database:user:list
List the users Orbit created for a connection, each with its privileges and who created it.Created by is the calling Node’s name, since the Gateway authorizes every command as a Node.
orbit database:destroy
Destroy one connection record.orbit database:query
Run one SQL statement against a registered connection. Without--write, the Gateway refuses a statement whose leading verb writes. That check reads only the leading verb; see Inspect a registered connection. The Gateway refuses SQL that is not sent against a stored slug.
A stacked statement returns
database.sql_multiple_statements. SQLite runs on the linked Node and returns database.sqlite_node_required without one. The Gateway returns at most 500 rows and sets truncated when more exist. --write is permission, not proof that rows changed.
Human output shows the write permission, the reported row count, and a truncation warning after the rows. It shows SQL null as NULL and an empty string as "". JSON keeps write, row_count, truncated, and the exact cell values.
orbit database:tables
List tables on a registered connection.orbit database:schema
Show columns for every table on a registered connection.orbit database:describe
Show columns for one table on a registered connection. An unknown table returnsdatabase.table_missing.
Related
instance:database:addandinstance:database:removeattach and detach a connection on one Instance.- Database servers explains how a server keeps its root password.
doctor --family=database_connectionreports missing, unhealthy, or mismatched attachments.