Creates a user in the current database, using the specified password and an optional role. When the role is unspecified, it defaults to
The command was introduced in version 2.2. It is a simple wrapper around the
ORole classes. More information is available at Security.
CREATE USER <user> IDENTIFIED BY <password> [ROLE <role>]
<user>Defines the logical name of the user you want to create.
<password>Defines the password to use for this user.
ROLEDefines the role you want to set for the user. For multiple roles, use the following syntax:
Create a new admin user called
Foowith the password
CREATE USER Foo IDENTIFIED BY bar ROLE admin
Create a new user called
Barwith the password
CREATE USER Bar IDENTIFIED BY Foo
For more information, see