---
title: "Change database password"
method: PATCH
path: "/api/hosting/v1/accounts/{username}/databases/{name}/change-password"
tags: ["Hosting: Databases"]
---

# Change database password

`PATCH /api/hosting/v1/accounts/{username}/databases/{name}/change-password`

Changes the password for the specified database user.

The database name must be the full name returned by the list databases endpoint.
The password must also be updated in any website configuration that uses this database.

## Path parameters

- `username` string, required
- `name` string, required

## Request body

- HostingV1DatabasesChangeDatabasePasswordRequest
  - `password` string, password, required — New database user password.

## Response `200`

Success empty response

- CommonSuccessEmptyResource
  - `message` string

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

---

[API](https://skmtc.dev/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.dev/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/revisions/53ccee45e5eb/schema)
