Skip to content
Merged
2 changes: 1 addition & 1 deletion TOC-tidb-cloud-premium.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
- [Password Authentication](/tidb-cloud/tidb-cloud-password-authentication.md)
- [Standard SSO Authentication](/tidb-cloud/tidb-cloud-sso-authentication.md)
- [Organization SSO Authentication](/tidb-cloud/tidb-cloud-org-sso-authentication.md)
- [Identity Access Management](/tidb-cloud/premium/manage-user-access-premium.md)
- [Identity Access Management](/tidb-cloud/manage-user-access.md)
- [OAuth 2.0](/tidb-cloud/oauth2.md)
- Network Access Control
- [Configure an IP Access List](/tidb-cloud/premium/configure-ip-access-list-premium.md)
Expand Down
44 changes: 43 additions & 1 deletion develop/dev-guide-gui-datagrip.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TiDB is a MySQL-compatible database, and [JetBrains DataGrip](https://www.jetbra

> **Note:**
>
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.

You can use DataGrip in two ways:

Expand Down Expand Up @@ -75,6 +75,48 @@ Connect to TiDB depending on the TiDB deployment option you've selected.

9. Click **OK** to save the connection configuration.

</div>
<div label="{{{ .premium }}}">

1. Navigate to the [**My TiDB**](https://tidbcloud.com/tidbs) page, and then click the name of your target {{{ .premium }}} instance to go to its overview page.

2. In the left navigation pane, click **Settings** > **Networking**.

3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.

Ensure that your client IP address is added to the access list.

4. In the left navigation pane, click **Overview** to return to the instance overview page.

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

6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.

- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
- If you have not set a password yet, click **Set Root Password** in the dialog.
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
- In addition to the **Public** connection type, {{{ .premium }}} supports **Private Endpoint** connections. For more information, see [Connect to {{{ .premium }}} via AWS PrivateLink](/tidb-cloud/premium/connect-to-premium-via-aws-private-endpoint.md).

7. Launch DataGrip and create a project to manage your connections.

8. In the newly created project, click **+** in the upper-left corner of the **Database Explorer** panel, and select **Data Source** > **Other** > **TiDB**.

9. Copy and paste the appropriate connection string into the **Data Source and Drivers** window in DataGrip. The mappings between DataGrip fields and {{{ .premium }}} connection string are as follows:

| DataGrip field | {{{ .premium }}} connection string |
| -------------- | ------------------------------- |
| Host | `{host}` |
| Port | `{port}` |
| User | `{user}` |
| Password | `{password}` |

- On the **SSH/SSL** tab, clear the **Use SSL** checkbox.
- If a **Download missing driver files** warning is displayed, click **Download** to acquire the driver files.

10. Click **Test Connection** to validate the connection to the {{{ .premium }}} instance.

11. Click **OK** to save the connection configuration.

</div>
<div label="TiDB Cloud Dedicated">

Expand Down
41 changes: 40 additions & 1 deletion develop/dev-guide-gui-dbeaver.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In this tutorial, you can learn how to connect to TiDB using DBeaver Community.

> **Note:**
>
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.

## Prerequisites

Expand Down Expand Up @@ -86,6 +86,45 @@ Connect to TiDB depending on the TiDB deployment option you've selected.

9. Click **Finish** to save the connection configuration.

</div>
<div label="{{{ .premium }}}">

1. Navigate to the [**My TiDB**](https://tidbcloud.com/tidbs) page, and then click the name of your target {{{ .premium }}} instance to go to its overview page.

2. In the left navigation pane, click **Settings** > **Networking**.

3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.

Ensure that your client IP address is added to the access list.

4. In the left navigation pane, click **Overview** to return to the instance overview page.

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

6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.

- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
- If you have not set a password yet, click **Set Root Password** in the dialog.
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
- In addition to the **Public** connection type, {{{ .premium }}} supports **Private Endpoint** connections. For more information, see [Connect to {{{ .premium }}} via AWS PrivateLink](/tidb-cloud/premium/connect-to-premium-via-aws-private-endpoint.md).

7. Launch DBeaver and click **New Database Connection** in the upper-left corner. In the **Connect to a database** dialog, select **TiDB** from the list, and then click **Next**.

8. Copy and paste the appropriate connection string into the DBeaver connection panel. The mappings between DBeaver fields and {{{ .premium }}} connection string are as follows:

| DBeaver field | {{{ .premium }}} connection string |
|---------------| ------------------------------- |
| Server Host | `{host}` |
| Port | `{port}` |
| Username | `{user}` |
| Password | `{password}` |

Keep the SSL settings disabled.

9. Click **Test Connection** to validate the connection to the {{{ .premium }}} instance.

10. Click **Finish** to save the connection configuration.

</div>
<div label="TiDB Cloud Dedicated">

Expand Down
38 changes: 37 additions & 1 deletion develop/dev-guide-gui-mysql-workbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In this tutorial, you can learn how to connect to TiDB using MySQL Workbench.

> **Note:**
>
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.

## Prerequisites

Expand Down Expand Up @@ -77,6 +77,42 @@ Connect to TiDB depending on the TiDB deployment option you have selected.

8. If the connection test is successful, you can see the **Successfully made the MySQL connection** message. Click **OK** to save the connection configuration.

</div>
<div label="{{{ .premium }}}">

1. Navigate to the [**My TiDB**](https://tidbcloud.com/tidbs) page, and then click the name of your target {{{ .premium }}} instance to go to its overview page.

2. In the left navigation pane, click **Settings** > **Networking**.

3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.

Ensure that your client IP address is added to the access list.

4. In the left navigation pane, click **Overview** to return to the instance overview page.

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

6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.

- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
- If you have not set a password yet, click **Set Root Password** in the dialog.
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
- In addition to the **Public** connection type, {{{ .premium }}} supports **Private Endpoint** connections. For more information, see [Connect to {{{ .premium }}} via AWS PrivateLink](/tidb-cloud/premium/connect-to-premium-via-aws-private-endpoint.md).

7. Launch MySQL Workbench and click **+** near the **MySQL Connections** title.

8. In the **Setup New Connection** dialog, configure the following connection parameters:

- **Connection Name**: give this connection a meaningful name.
- **Hostname**: enter the `HOST` parameter from the TiDB Cloud connection dialog.
- **Port**: enter the `PORT` parameter from the TiDB Cloud connection dialog.
- **Username**: enter the `USERNAME` parameter from the TiDB Cloud connection dialog.
- **Password**: click **Store in Keychain ...** or **Store in Vault**, enter the password of the {{{ .premium }}} instance, and then click **OK** to store the password.

9. Click **Test Connection** to validate the connection to the {{{ .premium }}} instance.

10. If the connection test is successful, you can see the **Successfully made the MySQL connection** message. Click **OK** to save the connection configuration.

</div>
<div label="TiDB Cloud Dedicated">

Expand Down
40 changes: 39 additions & 1 deletion develop/dev-guide-gui-navicat.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In this tutorial, you can learn how to connect to TiDB using Navicat.

> **Note:**
>
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.

## Prerequisites

Expand Down Expand Up @@ -73,6 +73,44 @@ Connect to TiDB depending on the TiDB deployment option you have selected.

9. If the connection test is successful, you can see the **Connection Successful** message. Click **OK** to finish the connection configuration.

</div>
<div label="{{{ .premium }}}">

1. Navigate to the [**My TiDB**](https://tidbcloud.com/tidbs) page, and then click the name of your target {{{ .premium }}} instance to go to its overview page.

2. In the left navigation pane, click **Settings** > **Networking**.

3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.

Ensure that your client IP address is added to the access list.

4. In the left navigation pane, click **Overview** to return to the instance overview page.

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

6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.

- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
- If you have not set a password yet, click **Set Root Password** in the dialog.
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
- In addition to the **Public** connection type, {{{ .premium }}} supports **Private Endpoint** connections. For more information, see [Connect to {{{ .premium }}} via AWS PrivateLink](/tidb-cloud/premium/connect-to-premium-via-aws-private-endpoint.md).

7. Launch Navicat Premium, click **Connection** in the upper-left corner, select **PingCAP** from the **Vendor Filter** list, and double-click **TiDB** in the right panel.

8. In the **New Connection (TiDB)** dialog, configure the following connection parameters:

- **Connection Name**: give this connection a meaningful name.
- **Host**: enter the `HOST` parameter from the TiDB Cloud connection dialog.
- **Port**: enter the `PORT` parameter from the TiDB Cloud connection dialog.
- **User Name**: enter the `USERNAME` parameter from the TiDB Cloud connection dialog.
- **Password**: enter the password of the {{{ .premium }}} instance.

9. Click the **SSL** tab and clear the **Use SSL** checkbox.

10. Click **Test Connection** to validate the connection to the {{{ .premium }}} instance.

11. If the connection test is successful, you can see the **Connection Successful** message. Click **OK** to finish the connection configuration.

</div>
<div label="TiDB Cloud Dedicated">

Expand Down
45 changes: 44 additions & 1 deletion develop/dev-guide-gui-vscode-sqltools.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In this tutorial, you can learn how to connect to TiDB using Visual Studio Code.

> **Note:**
>
> - This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
> - This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
> - This tutorial also works with Visual Studio Code Remote Development environments, such as [GitHub Codespaces](https://github.com/features/codespaces), [Visual Studio Code Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers), and [Visual Studio Code WSL](https://code.visualstudio.com/docs/remote/wsl).

## Prerequisites
Expand Down Expand Up @@ -93,6 +93,49 @@ Connect to TiDB depending on the TiDB deployment option you have selected.

8. If the connection test is successful, you can see the **Successfully connected!** message. Click **SAVE CONNECTION** to save the connection configuration.

</div>
<div label="{{{ .premium }}}">

1. Navigate to the [**My TiDB**](https://tidbcloud.com/tidbs) page, and then click the name of your target {{{ .premium }}} instance to go to its overview page.

2. In the left navigation pane, click **Settings** > **Networking**.

3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.

Ensure that your client IP address is added to the access list.

4. In the left navigation pane, click **Overview** to return to the instance overview page.

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

6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.

- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
- If you have not set a password yet, click **Set Root Password** in the dialog.
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
- In addition to the **Public** connection type, {{{ .premium }}} supports **Private Endpoint** connections. For more information, see [Connect to {{{ .premium }}} via AWS PrivateLink](/tidb-cloud/premium/connect-to-premium-via-aws-private-endpoint.md).

7. Launch VS Code and select the **SQLTools** extension on the navigation pane. Under the **CONNECTIONS** section, click **Add New Connection** and select **TiDB** as the database driver.

8. In the setting pane, configure the following connection parameters:

- **Connect using**: select **Server and Port**.
- **Server Address**: enter the `host` parameter from the TiDB Cloud connection dialog.
- **Port**: enter the `port` parameter from the TiDB Cloud connection dialog.
- **Database**: enter the database that you want to connect to.
- **Username**: enter the `user` parameter from the TiDB Cloud connection dialog.
- **Password mode**: select **SQLTools Driver Credentials**.
- In the **MySQL driver specific options** area, configure the following parameters:

- **Authentication Protocol**: select **default**.
- **SSL**: select **Disabled**.

9. Click **TEST CONNECTION** to validate the connection to the {{{ .premium }}} instance.

10. In the **SQLTools Driver Credentials** dialog, enter the password.

11. If the connection test is successful, click **SAVE CONNECTION** to save the connection configuration.

</div>
<div label="TiDB Cloud Dedicated">

Expand Down
51 changes: 46 additions & 5 deletions develop/dev-guide-sample-application-aws-lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In this tutorial, you can learn how to use TiDB and mysql2 in AWS Lambda Functio

> **Note**
>
> This tutorial works with {{{ .starter }}}, {{{ .essential }}}, and TiDB Self-Managed.
> This tutorial works with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, and TiDB Self-Managed.

## Prerequisites

Expand Down Expand Up @@ -99,7 +99,47 @@ Connect to TiDB depending on the TiDB deployment option you've selected.
"TIDB_HOST": "{gateway-region}.aws.tidbcloud.com",
"TIDB_PORT": "4000",
"TIDB_USER": "{prefix}.root",
"TIDB_PASSWORD": "{password}"
"TIDB_PASSWORD": "{password}",
"TIDB_ENABLE_SSL": "true"
}
}
```

Replace the placeholders in `{}` with the values obtained in the connection dialog.

</div>

<div label="{{{ .premium }}}">

1. Navigate to the [**My TiDB**](https://tidbcloud.com/tidbs) page, and then click the name of your target {{{ .premium }}} instance to go to its overview page.

2. In the left navigation pane, click **Settings** > **Networking**.

3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.

Ensure that your client IP address is added to the access list.

4. In the left navigation pane, click **Overview** to return to the instance overview page.

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

6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.

- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
- If you have not set a password yet, click **Set Root Password** in the dialog.
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
- In addition to the **Public** connection type, {{{ .premium }}} supports **Private Endpoint** connections. For more information, see [Connect to {{{ .premium }}} via AWS PrivateLink](/tidb-cloud/premium/connect-to-premium-via-aws-private-endpoint.md).

7. Copy and paste the corresponding connection string into `env.json`. The following is an example:

```json
{
"Parameters": {
"TIDB_HOST": "{host}",
"TIDB_PORT": "4000",
"TIDB_USER": "root",
"TIDB_PASSWORD": "{password}",
"TIDB_ENABLE_SSL": "false"
}
}
```
Expand All @@ -118,7 +158,8 @@ Copy and paste the corresponding connection string into `env.json`. The followin
"TIDB_HOST": "{tidb_server_host}",
"TIDB_PORT": "4000",
"TIDB_USER": "root",
"TIDB_PASSWORD": "{password}"
"TIDB_PASSWORD": "{password}",
"TIDB_ENABLE_SSL": "false"
}
}
```
Expand Down Expand Up @@ -273,10 +314,10 @@ function connect() {
user: process.env.TIDB_USER, // TiDB user, for example: {prefix}.root
password: process.env.TIDB_PASSWORD, // TiDB password
database: process.env.TIDB_DATABASE || 'test', // TiDB database name, default: test
ssl: {
ssl: process.env.TIDB_ENABLE_SSL === 'true' ? {
minVersion: 'TLSv1.2',
rejectUnauthorized: true,
},
} : null,
connectionLimit: 1, // Setting connectionLimit to "1" in a serverless function environment optimizes resource usage, reduces costs, ensures connection stability, and enables seamless scalability.
maxIdle: 1, // max idle connections, the default value is the same as `connectionLimit`
enableKeepAlive: true,
Expand Down
Loading
Loading