pydo.databases.reset_auth()

Generated on 8 May 2026 from pydo version v0.34.0

Usage

client.databases.reset_auth(
    database_cluster_uuid="9cc10173-e9ea-4176-9dbc-a4cee4c4ff30",
    username="app-01",
    body={
        "mysql_settings": {...},
    },
)
Returns JSONRaises HttpResponseError

Description

To reset the password for a database user, send a POST request to /v2/databases/{database_cluster_uuid}/users/{username}/reset_auth.

For mysql databases, the authentication method can be specifying by including a key in the JSON body called mysql_settings with the auth_plugin value specified.

The response will be a JSON object with a user key. This will be set to an object containing the standard database user attributes.

Parameters

database_cluster_uuid string required

A unique identifier for a database cluster.

username string required

The name of the database user.

mysql_settings object optional
Show child properties
auth_plugin string required

A string specifying the authentication method to be used for connections
to the MySQL user account. The valid values are mysql_native_password
or caching_sha2_password. If excluded when creating a new user, the
default for the version of MySQL in use will be used. As of MySQL 8.0, the
default is caching_sha2_password.

One of: mysql_native_password, caching_sha2_password

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "mysql_settings": {
    "auth_plugin": "caching_sha2_password"
  }
}

get_resp = client.databases.reset_auth(database_cluster_uuid="a7a8bas", username="admin", body=req)

Response Example

Show Response Example
{
  "user": {
    "name": "app-01",
    "role": "normal",
    "password": "jge5lfxtzhx42iff"
  }
}

More Information

See /v2/databases/{database_cluster_uuid}/users/{username}/reset_auth in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.