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.

SecurityBasicAuth
Request
query Parameters
database
required
string

The database's name.

Example: database=mydb
user
required
string

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.

Example: user=dbuser
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Mysql/revoke_access_to_database
Request samples
uapi --output=jsonpretty \
  --user=username \
  Mysql \
  revoke_access_to_database \
  user='dbuser' \
  database='mydb'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "revoke_access_to_database",
  • "module": "Mysql",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}