cPanel WHM icon

cPanel WHM

Full cPanel WHM API — all 622 operations across Accounts, DNS, Mail, SSL, Backups, Databases and more

Actions262

Database → Update MySQL username

AI-generated

Summary

Rename a MySQL database user by specifying the current username and the new desired username. Optionally specify the owner of the database user if needed.

Inputs

  • Oldname (required) — The database user's current name.
  • Newname (required) — The database user's new name. If database prefix is enabled, this must include the prefix for the account.
  • Cpuser — The database user's owner.

Output shape

a single response object containing the result of the rename operation from the WHM API

The output reflects the WHM API response for renaming a MySQL user, which may include success status or error details. The operation uses query string parameters for input and returns a direct API response without pagination.

Links

Discussion