This topic describes how to create a database user.
CREATE USER name [IDENTIFIED BY password]
|name||The name of the user.|
|password||The password of the user.|
The CREATE USER statement is used to add a new user to a PolarDB-O.
When the CREATE USER statement is executed, a schema will also be created with the same name as the new user and owned by the new user. Objects with unqualified names created by this user will be created in this schema.
- You must be a database superuser to use this statement.
- The maximum length allowed for the user name and password is 63 characters.
Create a user and set the password.
CREATE USER user IDENTIFIED BY password;