---
title: "Reset the database password"
method: PATCH
path: "/v2/databases/{databaseID}/reset-password"
tags: ["Configuration"]
---

# Reset the database password

`PATCH /v2/databases/{databaseID}/reset-password`

## Request

- Base URL: `https://api.liara.ir`
- URL: `https://api.liara.ir/v2/databases/{databaseID}/reset-password`
- Auth: HTTP bearer

Replaces the database's password with a new random one, in the background. Read the new password with `GET /v1/databases/{databaseID}` once the operation succeeds (see `GET /v2/databases/{databaseID}/operations-status`). Only for running `mysql`, `mariadb`, `postgres` and `mongodb` databases.

This endpoint is rate limited. Team permission: `manage`.

## Path parameters

- `databaseID` string, required: 24-character hexadecimal ID.

## Query parameters

- `teamID` string: 24-character hexadecimal ID.

## Response `200`

The reset started. The response body is empty.

## Other responses

- `400`: The database ID or `teamID` is invalid, the database is off (`cannot_change_password_of_stopped_database`), or its type doesn't support password resets.
- `401`: The API token is missing, invalid or expired.
- `403`: The database isn't running (`can_only_change_password_of_running_database`), or, with `teamID`, you aren't a member (`team_not_found`) or lack the permission (`no_permission`).
- `404`: The database doesn't exist.
- `429`: Too many requests. Wait and try again later.

## Changes

> 21 revisions in range; 1 not diffed.

- **2026-11-02** `f6f78c6f05c6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/liara-cloud/apis/dbaas/changes/v2/databases/:databaseID/reset-password/patch.md)

---

[API](https://skmtc.dev/liara-cloud/apis/dbaas.md) - [All operations](https://skmtc.dev/liara-cloud/apis/dbaas/llms.txt) - [OpenAPI document](https://skmtc.dev/liara-cloud/apis/dbaas/revisions/f6f78c6f05c6?raw)
