latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

Databases
MySQL Databases

Update MySQL user password

This function changes a MySQL® database user's password.

Important:

When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.

get/set_mysql_password

Query parameters

passwordstring required
Example:123456luggage

The database user's new password.

userstring username required
Example:username

The database username. For information about database username restrictions, read the MySQL and MariaDB documentation.

cpuserstring username
Example:example

The cPanel user that controls the database user.

Response

HTTP Request was successful.

Example response

{
  "metadata": {
    "command": "set_mysql_password",
    "reason": "OK",
    "result": 1,
    "version": 1
  }
}