Updated on 2024-03-14 GMT+08:00

Managing Users

GaussDB(DWS) allows you to manage database users on the console. You can create, delete, and update database users and manage their permissions on the console.

  • If the current console does not support this feature, contact technical support.
  • After a cluster is created, the users or roles created with it cannot be modified.
  • Before using this function, ensure that the cluster is available.

Creating a User

  1. Log in to the GaussDB(DWS) management console. In the navigation pane, choose Clusters > Dedicated Clusters.
  2. In the cluster list, click the name of the target cluster. The Cluster Information page is displayed.
  3. In the navigation pane, choose User Management.
  4. On the Users tab, click Create User. The user creation page is displayed.

  5. Complete the user information as required, confirm the information, and click Next.

    • Username: A username must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.
    • Password: A password must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.

      Contains at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters (~!?,.:;_(){}[]/<>@#%^&*+|\\=-)

    • Maximum Connections: The maximum number of database connections that a user can set up. The value -1 indicates that the number of connections is not limited.
    • Create Database: Whether the user has the permission to create databases.
    • Create Role: Whether the user has the permission to create users and roles.
    • Inherit Permissions: Whether a role inherits the permissions from its group. This function is enabled by default. You are advised to retain this setting.

  6. Select the role to be granted to the user and click Next.

  7. Configure permissions not included in the roles of the user.

    Click Add to add a permission configuration. Select the database object type and the corresponding objects. Then, select permissions. For details about permission definitions, see "DCL Syntax > GRANT" in SQL Syntax Reference.

  8. After the authorization is complete, click Create.

Modifying a User

  1. Log in to the GaussDB(DWS) management console. In the navigation pane, choose Clusters > Dedicated Clusters.
  2. In the cluster list, click the name of the target cluster. The Cluster Information page is displayed.
  3. In the navigation pane, choose User Management.
  4. In the user list, select a user and click Modify. The page for modifying user details is displayed.

  5. Modify the user information. For details, see User Information. After confirming that the information is correct, click Next.

  6. Select the role to be granted to the user and click Next.

  7. Add or remove permissions as required.

  8. Confirm the permissions. Click lick Save.

Deleting a User

  1. Log in to the GaussDB(DWS) management console. In the navigation pane, choose Clusters > Dedicated Clusters.
  2. In the cluster list, click the name of the target cluster. The Cluster Information page is displayed.
  3. In the navigation pane, choose User Management.
  4. Select a user from the user list and click Delete. A confirmation dialog box is displayed.

  5. Click OK.

    If a user has dependencies on database objects, such as tables, that have not been deleted, the user will fail to be deleted.