Change database password
Changes the password for the specified database user.
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.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
usernamestringRequiredExample:
u123456789namestringRequiredExample:
Full database name as returned by the list databases endpoint.
u123456789_test_dbBody
passwordstring · passwordRequiredExample:
New database user password.
Secu4ePa$$wor!DResponses
200
Success empty response
application/json
messagestringOptionalExample:
Request accepted401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
patch/api/hosting/v1/accounts/{username}/databases/{name}/change-password
PATCH /api/hosting/v1/accounts/{username}/databases/{name}/change-password HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 30
{
"password": "Secu4ePa$$wor!D"
}{
"message": "Request accepted"
}Last updated
Was this helpful?