This topic describes how to create an account and reset the password for an AnalyticDB for PostgreSQL instance.
Background information
AnalyticDB for PostgreSQL provides two types of database accounts: privileged accounts and standard accounts.
- Privileged accounts have all permissions on all databases.
- Standard accounts have all permissions only on the databases that the accounts are
authorized to manage.
Note Permissions include SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, and TRIGGER.
An account is created for an AnalyticDB for PostgreSQL instance before you use AnalyticDB for PostgreSQL. You cannot use the console to create other accounts. However, you can connect to the instance and execute SQL statements to create other accounts. For more information, see Execute SQL statements to create accounts.
Create an initial account
- After the initial account is created, you cannot delete the account.
- The initial account is a privileged account.
Execute SQL statements to create accounts
- Create a privileged account
create role admin0 WITH LOGIN ENCRYPTED PASSWORD '111111' rds_superuser;
- Create a standard account
create role test1 WITH LOGIN ENCRYPTED PASSWORD '111111';
Reset a password
If you forget the password of your database account, you can reset the password in the AnalyticDB for PostgreSQL console.
Related API operations
API | Description |
---|---|
CreateAccount | Creates an account for a database. |
DescribeAccounts | Queries the account information of a database. |
ModifyAccountDescription | Modifies the account name of a database. |
ResetAccountPassword | Resets the password of an account. |