Get your free beta license ↗
API operation · databases group
PATCH

/databases/users/{name}

First published 3 Oct 20260.1.0Unchanged since publication

Change a database user's password

Who may call it
AdministratorResellerCustomer
Token scope, any of
databasesall
Answers200 OK

UrbeStack changes the password for every MariaDB account with the given name, including accounts for hosts added directly in MariaDB. It recreates missing local accounts and reapplies the recorded grants across all accounts, removing extra privileges granted directly in MariaDB. The response returns the updated database user in user.

The API returns 400 for a name outside the allowed format of 1 to 64 ASCII letters, digits, or underscores. A missing database user or one outside the caller's permitted accounts returns 404.

As a command

Run as root on the server

Parameters

namepath ·DatabaseNameRequired

Request body

JSON· 1 field
passwordstring, up to 128 charactersRequired

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X PATCH "$API/databases/users/alice" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "password": "Sup3r-Secret-Passphrase"
  }'
Response · 200 OK
{
  "user": {
    "created_at": "2026-09-09T10:15:00Z",
    "grants": [
      {
        "database": "alice_shop",
        "level": "full",
        "privileges": "text"
      }
    ],
    "id": 1,
    "name": "alice",
    "other_hosts": [
      "text"
    ],
    "updated_at": "text",
    "user": "alice",
    "user_id": 2
  }
}

Errors

6 errors, each a status and a sentence
400--name is required
400A <what> name is 1 to 64 letters, digits or underscores
400A new password is required
400Invalid password: 8 to 128 printable characters
401Authentication required
404No such database user: <name>
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/patch-databases-users-name/