Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: xixirangrang <[email protected]>
  • Loading branch information
qiancai and hfxsd authored Dec 20, 2023
1 parent af90c17 commit 0e205bd
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions tidb-cloud/configure-sql-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This document describes how to manage database users and roles using the **SQL U

> **Note:**
>
> - The **SQL Users** page is in beta and is only available upon request. To request this feature, click **?** in the lower-right corner of the [TiDB Cloud console](https://tidbcloud.com) and click **Request Support**. Then, fill in "Apply for the SQL Users page" in the **Description** field and click **Send**.
> - The **SQL Users** page is in beta and is only available upon request. To request this feature, click **?** in the lower-right corner of the [TiDB Cloud console](https://tidbcloud.com) and click **Request Support**. Then, fill in "Apply for the SQL Users page" in the **Description** field and click **Submit**.
> - Database users and roles are independent of [organization and project users and roles](/tidb-cloud/manage-user-access.md). Database users are used to access databases in a TiDB cluster, while organization and project users are used to access organizations and projects in the [TiDB Cloud console](https://tidbcloud.com/).
> - In addition to the **SQL Users** page, you can also manage database users and roles by connecting to your cluster with a SQL client and writing SQL statements. For more information, see [TiDB User Account Management](https://docs.pingcap.com/tidb/dev/user-account-management).
Expand All @@ -29,7 +29,7 @@ In TiDB Cloud, you can grant both a built-in role and multiple custom roles (if

In addition to a built-in role, if your cluster has custom roles that are created using the [`CREATE ROLE`](/sql-statements/sql-statement-create-role.md) statement, you can also grant these custom roles to a SQL user when you create or edit SQL users in the TiDB Cloud console.

After a SQL user is granted both a built-in role and multiple custom roles, the user's permissions will be the union of all the permissions from these roles.
After a SQL user is granted both a built-in role and multiple custom roles, the user's permissions will be the union of all the permissions derived from these roles.

## Prerequisites

Expand All @@ -46,15 +46,16 @@ To create a SQL user, take the following steps:
>
> If you have multiple projects, you can click <MDSvgIcon name="icon-left-projects" /> in the lower-left corner and switch to another project.
2. Click your cluster name, and then click **SQL users** in the left navigation pane.
2. Click your cluster name, and then click **SQL Users** in the left navigation pane.

3. Click **Create SQL User** in the upper-right corner.

A dialog for the SQL user configuration is displayed.

4. In the dialog, provide the information of the SQL user as follows:

1. Enter the name of the SQL user.
2. Either enter a password for the SQL users or let TiDB Cloud automatically generate a password for the user.
2. Either create a password for the SQL user or let TiDB Cloud automatically generate a password for the user.
3. Grant roles to the SQL user.

- **Built-in Role**: you need to select a built-in role for the SQL user in the **Built-in Role** drop-down list.
Expand All @@ -75,7 +76,7 @@ To view SQL users of a cluster, take the following steps:
>
> If you have multiple projects, you can click <MDSvgIcon name="icon-left-projects" /> in the lower-left corner and switch to another project.
2. Click your cluster name, and then click **SQL users** in the left navigation pane.
2. Click your cluster name, and then click **SQL Users** in the left navigation pane.

## Edit a SQL user

Expand All @@ -87,12 +88,13 @@ To edit the password or roles of a SQL user, take the following steps:
>
> If you have multiple projects, you can click <MDSvgIcon name="icon-left-projects" /> in the lower-left corner and switch to another project.
2. Click your cluster name, and then click **SQL users** in the left navigation pane.
2. Click your cluster name, and then click **SQL Users** in the left navigation pane.

3. In the row of the SQL user to be edited, click **...** in the **Action** column, and then click **Edit**.

A dialog for the SQL user configuration is displayed.

4. In the dialog, you can edit the user password and roles as needed.
4. In the dialog, you can edit the user password and roles as needed, and then click **Update**.

> **Note:**
>
Expand All @@ -108,7 +110,8 @@ To delete a SQL user, take the following steps:
>
> If you have multiple projects, you can click <MDSvgIcon name="icon-left-projects" /> in the lower-left corner and switch to another project.
2. Click your cluster name, and then click **SQL users** in the left navigation pane.
2. Click your cluster name, and then click **SQL Users** in the left navigation pane.

3. In the row of the SQL user to be edited, click **...** in the **Action** column, and then click **Delete**.

> **Note:**
Expand Down

0 comments on commit 0e205bd

Please sign in to comment.