Description\n-----------\n\nThe CREATE ROLE statement creates one or more MariaDB roles. To use it, you must have the global CREATE USER privilege or the INSERT privilege for the mysql database. For each account, CREATE ROLE creates a new row in the mysql.user table that has no privileges, and with the corresponding is_role field set to Y. It also creates a record in the mysql.roles_mapping table.\n\nIf any of the specified roles already exist, ERROR 1396 (HY000) results. If an error occurs, CREATE ROLE will still create the roles that do not result in an error. The maximum length for a role is 128 characters. Role names can be quoted, as explained in the Identifier names page. Only one error is produced for all roles which have not been created:\n\n``\nERROR 1396 (HY000): Operation CREATE ROLE failed for 'a','b','c'\n`\n\nFailed CREATE or DROP operations, for both users and roles, produce the same error code.\n\nPUBLIC and NONE are reserved, and cannot be used as role names. NONE is used to unset a role and PUBLIC has a special use in other systems, such as Oracle, so is reserved for compatibility purposes.\n\nFor valid identifiers to use as role names, see Identifier Names.\n\nWITH ADMIN\n\nThe optional WITH ADMIN clause determines whether the current user, the current role or another user or role has use of the newly created role. If the clause is omitted, WITH ADMIN CURRENT_USER` is treated as the default, which means that the current user will be able to GRANT this role to users.\n\nExamples\n--------\n\nCREATE ROLE developer WITH ADMIN lorinda@localhost;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/account-management-sql-statements/create-role