This topic describes how to create a user for a PolarDB O Edition database.
CREATE USER name [IDENTIFIED BY password]
|The name of the user.
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a lowercase letter.
- The name must be 1 to 63 characters in length.
|The password of the user.
- The password can contain lowercase letters, digits, and underscores (_).
- The password must start with a lowercase letter.
- The password must be 1 to 63 characters in length.
When you execute the CREATE USER statement, PolarDB O Edition creates a schema that uses the same name as the user. The schema is owned by the user.
- You can execute this statement by using only a privileged account. For information about how to create a privileged account, see Create an account.
- You can execute this statement to create a standard account. For information about the permissions of standard accounts, see Account permissions.
Create a user named user and set the password to password.
CREATE USER user IDENTIFIED BY password;