CREATE USER

NOTE

Currently, creating users using SQL commands is not supported.

Description

Creates a CelerData cloud user. In CelerData, a username uniquely identifies a user.

Syntax

CREATE USER <username> IDENTIFIED BY '<auth_string>' [DEFAULT ROLE { <role_name>[, <role_name>, ...] | ALL | NONE }]

Parameters

  • username: the username you create for the user.
  • auth_string: the password you create for the user.
  • DEFAULT ROLE: If this parameter is specified, the roles are automatically assigned to the user and activated by default when the user logs in. If not specified, this user does not have any privileges. Make sure that all the roles that are specified already exist. You can add the ALL keyword to assign all roles to the user. Or you can add the NONE keyword to assign NONE roles to the user except PUBLIC.

Examples

Example 1: Create the user jack with the password 123456, and set db_admin and user_admin as the default roles for the user.

CREATE USER 'jack' IDENTIFIED BY '123456' DEFAULT ROLE db_admin, user_admin;