# Create MySQL user This function creates a MySQL® database user. When you the MySQL role and remote MySQL is not already configured, the system disables this function. Endpoint: GET /Mysql/create_user Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `name` (string, required) A valid database username. Important: ==== To learn more about database username limits, check your database type: MySQL 5.6 ---- MySQL 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 (). The server only applies the first eight characters of the cPanel account's username. For example: * A database prefix allows MySQL usernames of up to 13 characters. * An database prefix allows MySQL usernames of up to eight characters. 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 (). The server only applies the first eight characters of the cPanel account's username. For example: * A database prefix allows MySQL usernames of up to 29 characters. * An database prefix allows MySQL usernames of up to 24 characters. MariaDB ---- MariaDB 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 (). The server only applies the first eight characters of the cPanel account's username. For example: * A database prefix allows MariaDB usernames of up to 44 characters. * An database prefix allows MariaDB usernames of up to 39 characters. Example: "dbuser" - `password` (string, required) The new user's password. Example: "12345luggage" - `prefix-size` (integer) The desired prefix size. Enum: 8, 16 ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "create_user" - `module` (string) The name of the module called. Example: "Mysql" - `result` (object) - `result.data` (object,null) - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) * - Success * - Failed: Check the errors field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.