CREATE USER reference

CREATE USER - create a new user in the database.

Syntax#

Flow chart showing the syntax of the CREATE USER keyword

Description#

CREATE USER adds a new user to QuestDB instance, with optional password. Chosen name has to be unique across all users (including superadmin), groups and service accounts.

Examples#

Create new user without password#

CREATE USER john;
-- or
CREATE USER john WITH NO PASSWORD;

It can be verified with:

SHOW USER john;

that yields:

auth_typeenabled
Passwordfalse
JWK Tokenfalse
REST Tokenfalse

Create user with password#

CREATE USER jane WITH PASSWORD secret;

In this case SHOW USER command returns:

auth_typeenabled
Passwordtrue
JWK Tokenfalse
REST Tokenfalse

โญ Something missing? Page not helpful? Please suggest an edit on GitHub.