v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
Mysql
User Management

Return MySQL user privileges

This function lists a MySQL® database user's privileges.

Important:

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

get/Mysql/get_privileges_on_database

Query parameters

databasestring required
Example:mydb

The database name.

userstring required
Example:dbuser

The database user's name.

Important:

If database prefixing is enabled, you must prefix this value with the account prefix and an underscore (_).

For example, for the dbuser user on the user cPanel account, pass in a value of user_dbuser.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "get_privileges_on_database",
  "module": "Mysql",
  "result": {
    "data": [
      "CREATE"
    ],
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}