Description
This function renames a MySQL® database user.
Examples
{
"messages": null,
"errors": null,
"status": 1,
"metadata": {
},
"data": null
}
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
oldname |
string |
Required The user's current name. |
A MySQL database user on the cPanel account. |
dbuser |
newname |
string |
Required The user's new name. |
A valid MySQL database username.
Important: To learn more about database username limits, click the database type to expand the following: MySQL MariaDB
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. |
mynewusername |
Returns
This function only returns metadata.