This function creates a MySQL® database user.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
name required | string A valid database username. Important:To learn more about database username limits, check your database type: MySQL 5.6MySQL version 5.6 limits the database username to 16 characters. The server uses the first nine characters of this limit for the database prefix. The database prefix uses the cPanel account's username and an underscore ( For example:
MySQL 5.7+MySQL versions 5.7 and later limit the database username to 32 characters. The server uses the first nine characters of this limit for the database prefix. The database prefix uses the cPanel account's username and an underscore ( For example:
MariaDBMariaDB limits the database username to 47 characters. The server uses the first nine characters of this limit for the database prefix. The database prefix uses the cPanel account's username and an underscore ( For example:
Example: name=dbuser |
password required | string The new user's password. Example: password=12345luggage |
apiversion | integer The version of the API. |
func | string The name of the method called. |
module | string The name of the module called. |
object |
uapi --user=username Mysql create_user name='dbuser' password='12345luggage'
{- "apiversion": 3,
- "func": "create_user",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}