PolarDB for PostgreSQL provides two managed account types — privileged and standard — for database administration. This topic explains the differences between account types and walks you through creating an account in the console.
Account types
| Account type | How it is managed | Permissions |
|---|---|---|
| Privileged account | Console or API only | Full permissions on all databases in the cluster; supports fine-grained control over user permissions (for example, you can grant different users the permissions to query different tables); can manage all standard accounts; can disconnect any account from the cluster |
| Standard account | Console or SQL statements | Permissions on specific databases only, manually granted per account; cannot create, manage, or disconnect other accounts |
Multiple accounts of each type can exist in the same cluster. The maximum number of standard accounts that you can create depends on the database engine. Use a privileged account for cluster-wide administration and a standard account for application-level database access.
Prerequisites
Before you begin, ensure that you have:
A PolarDB for PostgreSQL cluster
Access to the PolarDB console
Create an account
Log on to the PolarDB console.
In the upper-left corner, select the region where your cluster is located.
On the Clusters page, find the cluster and click its cluster ID.
In the left-side navigation pane, choose Settings and Management > Accounts.
Click Create Account.
In the Create Account panel, set the following parameters.
Parameter Description Account Name Enter an account name. The name must: start with a lowercase letter and end with a letter or digit; contain only lowercase letters, digits, and underscores ( _); be 2–16 characters long; not be a reserved name such asrootoradmin.Account Type Select Privileged Account or Standard Account. Password Enter a password. The password must: be 8–32 characters long; include at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters ( ! @ # $ % ^ & * ( ) _ + - =).Confirm Password Re-enter the password. Description Enter a description to identify the account. The description must be 2–256 characters long and cannot start with http://orhttps://.Click Create.
API reference
| API | Description |
|---|---|
| Creates an account | |
| Queries the accounts of a specified cluster | |
| Modifies the description of a database account | |
| Changes the password of a database account | |
| Deletes an account |
What's next
Connect to your cluster using an endpoint: