Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

Use active voice to improve clarity and follow the technical writing principles.

Suggested change
5. Click **Connect** in the upper-right corner. A connection dialog is displayed.
5. Click **Connect** in the upper-right corner. The connection dialog appears.
References
  1. Avoid passive voice overuse and prefer active voice. (link)


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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

There is a technical inconsistency here. Step 6 (line 97) mentions downloading a CA certificate, but this step instructs users to clear the Use SSL checkbox. For public endpoints on a cloud service, SSL should be enabled and configured using the provided CA certificate for security.

Suggested change
- On the **SSH/SSL** tab, clear the **Use SSL** checkbox.
- On the **SSH/SSL** tab, select the **Use SSL** checkbox and specify the CA certificate path in the **CA file** field.
References
  1. Ensure technical accuracy and terminology consistency. (link)

- If a **Download missing driver files** warning is displayed, click **Download** to acquire the driver files.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

Use active voice and address the user directly as per the style guide.

Suggested change
- If a **Download missing driver files** warning is displayed, click **Download** to acquire the driver files.
- If you see a **Download missing driver files** warning, click **Download** to acquire the driver files.
References
  1. Write in second person ("you") when addressing users and avoid passive voice. (link)


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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

Capitalize the first word of the description in the list for consistency and better grammar.

Suggested change
- **Connection Name**: give this connection a meaningful name.
- **Connection Name**: Give this connection a meaningful name.
References
  1. Correct English grammar, spelling, and punctuation mistakes. (link)

- **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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Technical inconsistency. Step 6 (line 130) mentions downloading a CA certificate, but the environment variable is set to false. For security on public endpoints, SSL should be enabled.

Suggested change
"TIDB_ENABLE_SSL": "false"
"TIDB_ENABLE_SSL": "true"
References
  1. Ensure technical accuracy. (link)

}
}
```
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