Source: https://dev-docs.nebula-graph.io/v5.3.2/server-admin/authorization/create-role/ Documentation version: v5.3.2 # CREATE ROLE `CREATE ROLE` creates a custom role in the current service group. A new role has no privileges until you add them with [GRANT](https://dev-docs.nebula-graph.io/v5.3.2/server-admin/authorization/grant-privilege/). ## Prerequisites First [connect to the Graph service](https://dev-docs.nebula-graph.io/v5.3.2/get-started/first-query/#connect). Run the command in a GQL client. To create a role, you must have `ADMIN` in the current service group. ## Syntax Syntax diagramBNF create_role_command ```` create_role_command ::= 'CREATE' 'ROLE' ('IF NOT EXISTS')? role_name ('COMMENT' '"' comment '"')? ```` ## Parameters ### `IF NOT EXISTS` Skip creation if the role exists, preserving its description and privileges. Without this clause, an existing role with the same name causes an error. ### `role_name` The name of the role to be created. `role_name` must be a regular identifier. For more information about identifiers, see [Rules for naming identifiers](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/overview/keywords-identifiers/). ### `comment` The description of the role. The description must be a string literal. ## Examples ```` CREATE ROLE IF NOT EXISTS role1 COMMENT "This is role1" ```` Check [SHOW ALL ROLES](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-admin/show/show-all-roles/) for a record with `name` set to `role1` and `comment` set to `This is role1`.