v1

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

Remove MySQL user privileges

This function revokes 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/revoke_access_to_database

Query parameters

databasestring required
Example:mydb

The database's 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": "revoke_access_to_database",
  "module": "Mysql",
  "result": {
    "status": 1
  }
}