Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud: update connection page for TiDB Dedicated clusters #18721

Merged
merged 15 commits into from
Sep 4, 2024
Merged
4 changes: 2 additions & 2 deletions TOC-tidb-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
- [Create a TiDB Dedicated Cluster](/tidb-cloud/create-tidb-cluster.md)
- Connect to Your TiDB Dedicated Cluster
- [Connection Method Overview](/tidb-cloud/connect-to-tidb-cluster.md)
- [Connect via Standard Connection](/tidb-cloud/connect-via-standard-connection.md)
- [Connect via Public Connection](/tidb-cloud/connect-via-standard-connection.md)
- [Connect via Private Endpoint with AWS](/tidb-cloud/set-up-private-endpoint-connections.md)
- [Connect via Private Endpoint (Private Service Connect) with Google Cloud](/tidb-cloud/set-up-private-endpoint-connections-on-google-cloud.md)
- [Connect via VPC Peering](/tidb-cloud/set-up-vpc-peering-connections.md)
Expand Down Expand Up @@ -311,7 +311,7 @@
- Data Access Control
- [Encryption at Rest Using Customer-Managed Encryption Keys](/tidb-cloud/tidb-cloud-encrypt-cmek.md)
- Database Access Control
- [Configure Cluster Security Settings](/tidb-cloud/configure-security-settings.md)
- [Configure Cluster Password Settings](/tidb-cloud/configure-security-settings.md)
- Audit Management
- [Database Audit Logging](/tidb-cloud/tidb-cloud-auditing.md)
- [Console Audit Logging](/tidb-cloud/tidb-cloud-console-auditing.md)
Expand Down
2 changes: 1 addition & 1 deletion tidb-cloud/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ summary: TiDB Cloud is a fully-managed Database-as-a-Service (DBaaS) that brings

[Manage project access](https://docs.pingcap.com/tidbcloud/manage-user-access#manage-project-access)

[Configure Security Settings](https://docs.pingcap.com/tidbcloud/configure-security-settings)
[Configure Password Settings](https://docs.pingcap.com/tidbcloud/configure-security-settings)

</LearningPath>

Expand Down
8 changes: 4 additions & 4 deletions tidb-cloud/backup-and-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ To restore your TiDB Dedicated cluster data from a backup to a new cluster, take

7. Click **Restore**.

The cluster restore process starts and the **Security Settings** dialog box is displayed.
The cluster restore process starts and the **Password Settings** dialog box is displayed.

8. In the **Security Settings** dialog box, set the root password and allowed IP addresses to connect to your cluster, and then click **Apply**.
8. In the **Password Settings** dialog box, set the root password to connect to your cluster, and then click **Save**.

### Restore a deleted cluster

Expand All @@ -261,6 +261,6 @@ To restore a deleted cluster from recycle bin, take the following steps:

6. Click **Confirm**.

The cluster restore process starts and the **Security Settings** dialog box is displayed.
The cluster restore process starts and the **Password Settings** dialog box is displayed.

7. In the **Security Settings** dialog box, set the root password and allowed IP addresses to connect to your cluster, and then click **Apply**.
7. In the **Password Settings** dialog box, set the root password to connect to your cluster, and then click **Save**.
50 changes: 8 additions & 42 deletions tidb-cloud/configure-ip-access-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,14 @@ For each TiDB Dedicated cluster in TiDB Cloud, you can configure an IP access li
>
> Configuring the IP access list is only available for [TiDB Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-dedicated) clusters.

For a TiDB Dedicated cluster, you can configure its IP access list in either of the following ways:
To configure an IP access list, take the following steps in the [TiDB Cloud console](https://tidbcloud.com/console/clusters):

- [Configure an IP access list in standard connection](#configure-an-ip-access-list-in-standard-connection)
1. Navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page, and then click the name of your target cluster to go to its overview page.
2. In the left navigation pane, click **Networking**, and then click **Add IP Address**.
3. In the dialog, choose one of the following options:

- [Configure an IP access list in security settings](#configure-an-ip-access-list-in-security-settings)
- **Allow access from anywhere**: allows all IP addresses to access TiDB Cloud. This option exposes your cluster to the internet completely and is highly risky.
- **Use IP addresses** (recommended): you can add a list of IPs and CIDR addresses that are allowed to access TiDB Cloud via a SQL client.

## Configure an IP access list in standard connection

To configure an IP access list for your TiDB Dedicated cluster in standard connection, take the following steps:

1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page of your project.
2. In the row of your TiDB Dedicated cluster, click **...** and select **Connect**. A dialog is displayed.
3. In the dialog, locate **Step 1: Create traffic filter** on the **Standard Connection** tab and configure the IP access list.

- If the IP access list of your cluster has not been set, you can click **Add My Current IP Address** to add your current IP address to the IP access list, and then click **Add Item** to add more IP addresses if necessary. Next, click **Update Filter** to save the configuration.

> **Note:**
>
> For each TiDB Dedicated cluster, you can add up to 100 IP addresses to the IP access list. To apply for a quota to add more IP addresses, contact [TiDB Cloud Support](/tidb-cloud/tidb-cloud-support.md).

- If the IP access list of your cluster has been set, click **Edit** to add, edit, or remove IP addresses, and then click **Update Filter** to save the configuration.

- To allow any IP address to access your cluster (not recommended), click **Allow Access From Anywhere**, and then click **Update Filter**. According to security best practices, it is NOT recommended that you allow any IP address to access your cluster, as this would expose your cluster to the internet completely, which is highly risky.

## Configure an IP access list in security settings

To configure an IP access list for your TiDB Dedicated cluster in security settings, take the following steps:

1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page of your project.
2. In the row of your TiDB Dedicated cluster, click **...** and select **Security Settings**. A security setting dialog is displayed.
3. In the dialog, configure the IP access list as follows:

- To add your current IP address to the IP access list, click **Add My Current IP Address**.

- To add an IP address to the IP access list, enter the IP address and description, and click **Add to IP List**.

> **Note:**
>
> For each TiDB Dedicated cluster, you can add up to 100 IP addresses to the IP access list. To apply for a quota to add more IP addresses, contact [TiDB Cloud Support](/tidb-cloud/tidb-cloud-support.md).

- To allow any IP address to access your cluster (not recommended), click **Allow Access From Anywhere**. According to security best practices, it is NOT recommended that you allow any IP address to access your cluster, as this would expose your cluster to the internet completely, which is highly risky.

- To remove an IP address from the access list, click **Remove** in the line of the IP address.

4. Click **Apply** to save the configuration.
4. If you choose **Use IP addresses**, add IP addresses or CIDR range with an optional description. For each TiDB Dedicated cluster, you can add up to 100 IP addresses.
5. Click **Confirm** to save your changes.
16 changes: 7 additions & 9 deletions tidb-cloud/configure-security-settings.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Configure Cluster Security Settings
summary: Learn how to configure the root password and allowed IP addresses to connect to your cluster.
title: Configure Cluster Password Settings
summary: Learn how to configure the root password to connect to your cluster.
---

# Configure Cluster Security Settings
# Configure Cluster Password Settings

For TiDB Dedicated clusters, you can configure the root password and allowed IP addresses to connect to your cluster.

Expand All @@ -17,13 +17,11 @@ For TiDB Dedicated clusters, you can configure the root password and allowed IP
>
> If you have multiple projects, you can click <MDSvgIcon name="icon-left-projects" /> in the lower-left corner and switch to another project.

2. In the row of your target cluster, click **...** and select **Security Settings**.
3. In the **Security Settings** dialog, configure the root password and allowed IP addresses.
2. In the row of your target cluster, click **...** and select **Password Settings**.
3. Set the root password to connect to your cluster, and then click **Save**.

To allow your cluster to be accessible by any IP addresses, click **Allow Access from Anywhere**.

4. Click **Apply**.
You can click **Auto-generate Password** to generate a random password. The generated password will not show again, so save your password in a secure location.

> **Tip:**
>
> If you are viewing the overview page of your cluster, you can click the **...** in the upper-right corner of the page, select **Security Settings**, and configure these settings, too.
> If you are viewing the overview page of your cluster, you can click the **...** in the upper-right corner of the page, select **Password Settings**, and configure these settings, too.
25 changes: 14 additions & 11 deletions tidb-cloud/connect-to-tidb-cluster.md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,28 @@ This document introduces the methods to connect to your TiDB Dedicated cluster.

After your TiDB Dedicated cluster is created on TiDB Cloud, you can connect to it via one of the following methods:

- [Connect via standard connection](/tidb-cloud/connect-via-standard-connection.md)
- Direct connections

The standard connection exposes a public endpoint with traffic filters, so you can connect to your TiDB cluster via a SQL client from your laptop. You can connect to your TiDB clusters using TLS, which ensures the security of data transmission from your applications to TiDB clusters.
Direct connections use the MySQL native connection system over TCP. You can connect to your TiDB Dedicated cluster using any tool that supports MySQL connections, such as the [MySQL Command-Line Client](https://dev.mysql.com/doc/refman/8.0/en/mysql.html). TiDB Cloud also provides [SQL Shell](/tidb-cloud/connect-via-sql-shell.md), which enables you to try TiDB SQL, test out TiDB's compatibility with MySQL quickly, and manage user privileges.

- [Connect via private endpoint with AWS](/tidb-cloud/set-up-private-endpoint-connections.md) (recommended)
TiDB Dedicated provides three network connection types:

For TiDB Dedicated clusters hosted on AWS, private endpoint connection provides a private endpoint to allow SQL clients in your VPC to securely access services over AWS PrivateLink, which provides highly secure and one-way access to database services with simplified network management.
- [Public connection](/tidb-cloud/connect-via-standard-connection.md)

- [Connect via private endpoint with Google Cloud](/tidb-cloud/set-up-private-endpoint-connections-on-google-cloud.md) (recommended)
The public connection exposes a public endpoint with traffic filters, so you can connect to your TiDB cluster via a SQL client from your laptop. You can connect to your TiDB clusters using TLS, which ensures the security of data transmission from your applications to TiDB clusters. For more information, see [Connect to TiDB Dedicated via Public Connection](/tidb-cloud/connect-via-standard-connection.md).

For TiDB Dedicated clusters hosted on Google Cloud, private endpoint connection provides a private endpoint to allow SQL clients in your VPC to securely access services over Google Cloud Private Service Connect, which provides highly secure and one-way access to database services with simplified network management.
- Private endpoint (recommended)

- [Connect via VPC peering](/tidb-cloud/set-up-vpc-peering-connections.md)
Private endpoint connection provides a private endpoint to allow SQL clients in your VPC to securely access TiDB Dedicated clusters. This uses the private link service provided by different cloud providers, which provides highly secure and one-way access to database services with simplified network management.

If you want lower latency and more security, set up VPC peering and connect via a private endpoint using a VM instance on the corresponding cloud provider in your cloud account.
- For TiDB Dedicated clusters hosted on AWS, the private endpoint connection uses AWS PrivateLink. For more information, see [Connect to a TiDB Dedicated Cluster via Private Endpoint with AWS](/tidb-cloud/set-up-private-endpoint-connections.md).
- For TiDB Dedicated clusters hosted on Google Cloud, the private endpoint connection uses Google Cloud Private Service Connect. For more information, see [Connect to a TiDB Dedicated Cluster via Google Cloud Private Service Connect](/tidb-cloud/set-up-private-endpoint-connections-on-google-cloud.md).

- [Connect via built-in SQL Editor](/tidb-cloud/explore-data-with-chat2query.md)
- [VPC peering](/tidb-cloud/set-up-vpc-peering-connections.md)

If you want lower latency and more security, set up VPC peering and connect via a private endpoint using a VM instance on the corresponding cloud provider in your cloud account. For more information, see [Connect to TiDB Dedicated via VPC Peering](/tidb-cloud/set-up-vpc-peering-connections.md).

- [Built-in SQL Editor](/tidb-cloud/explore-data-with-chat2query.md)

> **Note:**
>
Expand All @@ -39,8 +44,6 @@ After your TiDB Dedicated cluster is created on TiDB Cloud, you can connect to i

In SQL Editor, you can either write SQL queries manually or simply press <kbd>⌘</kbd> + <kbd>I</kbd> on macOS (or <kbd>Control</kbd> + <kbd>I</kbd> on Windows or Linux) to instruct [Chat2Query (beta)](/tidb-cloud/tidb-cloud-glossary.md#chat2query) to generate SQL queries automatically. This enables you to run SQL queries against databases without a local SQL client. You can intuitively view the query results in tables or charts and easily check the query logs.

- [Connect via SQL Shell](/tidb-cloud/connect-via-sql-shell.md): to try TiDB SQL and test out TiDB's compatibility with MySQL quickly, or administer user privileges.

## What's next

After you have successfully connected to your TiDB cluster, you can [explore SQL statements with TiDB](/basic-sql-operations.md).
6 changes: 2 additions & 4 deletions tidb-cloud/connect-via-sql-shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ To connect to your TiDB cluster using SQL shell, perform 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 the name of your target cluster to go to its cluster overview page, and then click **Connect** in the upper-right corner. A connection dialog is displayed.

3. In the dialog, select the **Web SQL Shell** tab, and then click **Open SQL Shell**.

2. Click the name of your target cluster to go to its cluster overview page, and then click **Networking** in the left navigation pane.
3. On the **Networking** page, click **Web SQL Shell** in the upper-right corner.
4. On the prompted **Enter password** line, enter the root password of the current cluster. Then your application is connected to the TiDB cluster.
2 changes: 1 addition & 1 deletion tidb-cloud/connect-via-standard-connection-serverless.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This document describes how to connect to your TiDB Serverless cluster via a pub

> **Tip:**
>
> To learn how to connect to a TiDB Dedicated cluster via public endpoint, see [Connect to TiDB Dedicated via Standard Connection](/tidb-cloud/connect-via-standard-connection.md).
> To learn how to connect to a TiDB Dedicated cluster via public endpoint, see [Connect to TiDB Dedicated via Public Connection](/tidb-cloud/connect-via-standard-connection.md).

To connect to a TiDB Serverless cluster via public endpoint, take the following steps:

Expand Down
42 changes: 16 additions & 26 deletions tidb-cloud/connect-via-standard-connection.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
---
title: Connect to TiDB Dedicated via Standard Connection
summary: Learn how to connect to your TiDB Cloud cluster via standard connection.
title: Connect to TiDB Dedicated via Public Connection
summary: Learn how to connect to your TiDB Cloud cluster via public connection.
---

# Connect to TiDB Dedicated via Standard Connection
# Connect to TiDB Dedicated via Public Connection

This document describes how to connect to your TiDB Dedicated cluster via standard connection. The standard connection exposes a public endpoint with traffic filters, so you can connect to your TiDB Dedicated cluster via a SQL client from your laptop.
This document describes how to connect to your TiDB Dedicated cluster via public connection. The public connection exposes a public endpoint with traffic filters, so you can connect to your TiDB Dedicated cluster via a SQL client from your laptop.

> **Tip:**
>
> To learn how to connect to a TiDB Serverless cluster via standard connection, see [Connect to TiDB Serverless via Public Endpoint](/tidb-cloud/connect-via-standard-connection-serverless.md).
> To learn how to connect to a TiDB Serverless cluster via public connection, see [Connect to TiDB Serverless via Public Endpoint](/tidb-cloud/connect-via-standard-connection-serverless.md).

To connect to a TiDB Dedicated cluster via standard connection, take the following steps:
## Prerequisite: Configure IP access list

For public connections, TiDB Dedicated only allows client connections from addresses in the IP access list. If you have not configured the IP access list, follow the steps in [Configure an IP Access List](/tidb-cloud/configure-ip-access-list.md) to configure it before your first connection.

## Connect to the cluster

To connect to a TiDB Dedicated cluster via public connection, take the following steps:

1. Open the overview page of the target cluster.

Expand All @@ -25,29 +31,13 @@ To connect to a TiDB Dedicated cluster via standard connection, take the followi

2. Click **Connect** in the upper-right corner. A connection dialog is displayed.

3. Create a traffic filter for the cluster. Traffic filter is a list of IPs and CIDR addresses that are allowed to access TiDB Cloud via a SQL client.

If the traffic filter is already set, skip the following sub-steps. If the traffic filter is empty, take the following sub-steps to add one.

1. Click one of the buttons to add some rules quickly.

- **Add My Current IP Address**
- **Allow Access from Anywhere**

2. Provide an optional description for the newly added IP address or CIDR range.

3. Click **Create Filter** to confirm the changes.

4. Under **Step 2: Download CA cert** in the dialog, click **Download CA cert** for TLS connection to TiDB clusters. The CA cert supports TLS 1.2 version by default.
3. In the connection dialog, select **Public** from the **Connection Type** drop-down list.

> **Note:**
>
> - The CA cert is only available for TiDB Dedicated clusters.
> - Currently, TiDB Cloud only provides the connection strings and sample code for these connection methods: MySQL, MyCLI, JDBC, Python, Go, and Node.js.
If you have not configured the IP access list, click **Configure IP Access List** or follow the steps in [Configure an IP Access List](/tidb-cloud/configure-ip-access-list.md) to configure it before your first connection.

5. Under **Step 3: Connect with a SQL client** in the dialog, click the tab of your preferred connection method, and then refer to the connection string and sample code on the tab to connect to your cluster.
4. Click **CA cert** to download CA cert for TLS connection to TiDB clusters. The CA cert supports TLS 1.2 version by default.

Note that you need to use the path of the downloaded CA file as the argument of the `--ssl-ca` option in the connection string.
5. Choose your preferred connection method, and then refer to the connection string and sample code on the tab to connect to your cluster.

## What's next

Expand Down
Loading
Loading