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.

Constraints and Limitations

  • 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) console. In the navigation pane on the left, 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. The Basic Settings page is displayed. The parameters are described as follows:

    Table 1 Basic parameters of user information

    Parameter

    Description

    Example Value

    User Name

    The value must start with a letter and can contain a maximum of 63 characters, including letters, digits, and underscores (_).

    Dws-demo

    Password

    The value must start with a letter and can contain a maximum of 63 characters, including letters, digits, and underscores (_).

    Note

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

    -

    Maximum Connections

    Maximum number of connections between the user and the database. The value -1 indicates that the number of connections is not limited.

    -1

    Expires

    Expiration time of the user's permissions.

    -

    System Administrator

    Indicates whether the user is a system administrator.

    -

    Create Database

    Specifies whether the user has the permission to create databases.

    -

    Create Role

    Specifies whether the user has the permission to create users and roles.

    -

    Inherit Permissions

    Specifies whether the user inherits permissions from its user group. This function is enabled by default. You are advised to retain this setting.

    -

  6. If all the parameters are correctly set, click Next.

  7. On the Configure Roles page, select the role to be assigned to the user and click Next.

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

    Click Add to add a permission configuration. Select the database object type and corresponding database object, and select the permission to complete assignment For details about permission definitions, see "DCL Syntax" > "GRANT" in the GaussDB(DWS) SQL Overview.

  9. After the authorization is complete, click Create.

Modifying a User

  1. Log in to the GaussDB(DWS) console. In the navigation pane on the left, 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 Table 1. After confirming that the information is correct, click Next.

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

  7. After selecting a permission type, you can click Modify in the row where the permission is located to add or remove the permission.

  8. Confirm the permissions. Click Save.

Deleting a User

Prerequisites

To prevent any problems with deleting a user, check for dependencies between database objects (such as tables) beforehand. If there are any dependencies, delete them first before proceeding with the user deletion.

Procedure

  1. Log in to the GaussDB(DWS) console. In the navigation pane on the left, 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.