# CREATE ROLE

The `CREATE ROLE` command creates a role on a SingleStore cluster.

## Syntax

```sql
CREATE ROLE 'role_name' WITH [FAILED_LOGIN_ATTEMPTS = integer] [PASSWORD_LOCK_TIME = integer]

```

## Arguments

**FAILED\_LOGON\_ATTEMPTS**: Together with `PASSWORD_LOCK_TIME`, specifies the failed login attempt lockout behavior. `FAILED_LOGIN_ATTEMPTS` is the number of failed attempts allowed after which the account is locked out. A value of 3 would mean that the account would be locked after three failed attempts. Default is 0 which means there is no restriction. When set to a value >=1, `PASSWORD_LOCK_TIME` must also be specified.

**PASSWORD\_LOCK\_TIME**: Together with `FAILED_LOGIN_ATTEMPTS`, specifies the failed login attempt lockout behavior. `PASSWORD_LOCK_TIME` is the number of seconds a locked out account must wait before reattempting to log in.

> **📝 Note**: You must set both `FAILED_LOGIN_ATTEMPTS` and `PASSWORD_LOCK_TIME` to enable the lockout feature.

> **📝 Note**: To change the values for `FAILED_LOGIN_ATTEMPTS` and `PASSWORD_LOCK_TIME` for a role, drop and then re-create the role.

For more information about failed login attempt lockout behavior, see [SingleStore User Management](https://docs.singlestore.com/db/v9.1/user-and-cluster-administration/singlestore-user-management.md).

## Remarks

* This command causes implicit commits. Refer to [COMMIT](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-manipulation-language-dml/commit.md) for more information.
* Refer to the [Permissions Matrix](https://docs.singlestore.com/db/v9.1/reference/sql-reference/security-management-commands/permissions-matrix.md) for the required permissions.

## Example

```sql
CREATE ROLE 'role_name';

```

```output

Query OK, 0 rows affected (0.06 sec)

```

***

Modified at: June 11, 2026

Source: [/db/v9.1/reference/sql-reference/security-management-commands/create-role/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/security-management-commands/create-role/)

(An index of the documentation is available at /llms.txt)
