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 database name

AI-generated

Summary

Rename a MySQL database by specifying its current name and new desired name, optionally including the database owner username.

Inputs

  • Newname (required) — The database's new name, including the database prefix if prefixing is enabled. Must not exceed 64 characters.
  • Oldname (required) — The current name of the database to be renamed.
  • Cpuser — The username of the database's owner, if applicable.

Output shape

a single response object from the WHM API confirming the rename operation result

The operation returns the raw WHM API response indicating success or failure of the rename. Errors from the API (e.g., invalid names or permission issues) are reflected in the response and error handling exceptions.

Links

Discussion