---
title: blossom database_instance:credentials:rotate
url: "/docs/reference/cli/database_instance/credentials/rotate/"
canonical_url: https://docs.blossom88.com/docs/reference/cli/database_instance/credentials/rotate/
markdown_url: https://docs.blossom88.com/docs/reference/cli/database_instance/credentials/rotate.md
summary: Rotate the Database instance password
categories:
- cli
- reference
---

# blossom database_instance:credentials:rotate

Rotate the Database instance password

## Usage

    blossom database_instance:credentials:rotate --id ID [--yes] [--password-stdin] [--follow] [--timestamps]

## Flags

| Flag | Description |
| --- | --- |
| `--id (required)` | Database instance id |
| `--yes, -y` | Skip the confirmation prompt |
| `--password-stdin` | Set the password read from stdin instead of generating one |
| `--follow, -f` | Follow password rotation logs |
| `--timestamps` | Show log timestamps. Default: true. |

Sets a new password for the Database instance user inside the engine, then restarts
every linked Environment so its apps receive the new connection URL. The old
password stops working as soon as the engine accepts the new one.

Connections pause briefly while the password changes and the linked
Environments restart. Replicas and the standby follow the primary. Show the
new password afterward with `database_instance:credentials`.

    blossom database_instance:credentials:rotate --id database_instance-100 --follow
    blossom database_instance:credentials --id database_instance-100

To choose the password instead of generating one, pass it on stdin with
`--password-stdin` so it never appears in shell history or process listings.
It needs 8 to 64 characters: letters, digits, and `! # % * + , - . / : = ? @ ^ _ ~`.

    printf '%s' "$NEW_PASSWORD" | blossom database_instance:credentials:rotate --id database_instance-100 --password-stdin --yes
