You are here: Reference Information > SQL Reference Information > SQL Statements > CREATE USER

CREATE USER

CREATE USER — define a new database user

Syntax

CREATE USER username PASSWORD 'password'
CREATE USER username EXTERNAL

Description

CREATE USER adds a new user to a NuoDB database. The user is either an internal NuoDB database user or one that will be authenticated using an LDAP server. Using authentication via an LDAP server allows the DBA to minimize administrative duties, since your users will be able to reuse their existing account to access their NuoDB database.

Preview: NuoDB LDAP support is currently a preview feature. Specifically, LDAP support is insecure in the current release as passwords are sent in plain text.

Preview: NuoDB encourages you to use preview features in your development projects. However, the use of preview features in production is not supported.

You will not be able to create an external user, that is you will not be able to use CREATE USER username EXTERNAL, until all transaction engines in the current database are updated to a release equal to or greater than NuoDB 2.4. If an older database process is running in your database, you will receive this error message:

External users are not supported by this version of the database until the upgrade process has been completed

You will not be able to create an external user where a non-external user already exists with the same name.

Use ALTER USER to change a password for the user. Use DROP USER to remove a user. (See ALTER USERDROP USER.)

It is recommended that privileges be granted to roles and roles be granted to users. However, privileges can be granted and revoked to and from users, directly. Use GRANT to grant roles or privileges to users. Use REVOKE to revoke roles or privileges from users. (See GRANT, REVOKE.)

Parameters

Example

CREATE USER davide PASSWORD 'jw8s0F4';
CREATE USER pbrady EXTERNAL;