Skip to content

Commit bf96d9a

Browse files
authored
develop: add documents for TiDB Cloud Premium (#22533) (#22798)
1 parent a4aa9fe commit bf96d9a

26 files changed

Lines changed: 1123 additions & 32 deletions

develop/dev-guide-gui-datagrip.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ TiDB is a MySQL-compatible database, and [JetBrains DataGrip](https://www.jetbra
1010

1111
> **Note:**
1212
>
13-
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
13+
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
1414
1515
You can use DataGrip in two ways:
1616

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

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

78+
</div>
79+
<div label="{{{ .premium }}}">
80+
81+
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.
82+
83+
2. In the left navigation pane, click **Settings** > **Networking**.
84+
85+
3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.
86+
87+
Ensure that your client IP address is added to the access list.
88+
89+
4. In the left navigation pane, click **Overview** to return to the instance overview page.
90+
91+
5. Click **Connect** in the upper-right corner. A connection dialog is displayed.
92+
93+
6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.
94+
95+
- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
96+
- If you have not set a password yet, click **Set Root Password** in the dialog.
97+
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
98+
- 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).
99+
100+
7. Launch DataGrip and create a project to manage your connections.
101+
102+
8. In the newly created project, click **+** in the upper-left corner of the **Database Explorer** panel, and select **Data Source** > **Other** > **TiDB**.
103+
104+
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:
105+
106+
| DataGrip field | {{{ .premium }}} connection string |
107+
| -------------- | ------------------------------- |
108+
| Host | `{host}` |
109+
| Port | `{port}` |
110+
| User | `{user}` |
111+
| Password | `{password}` |
112+
113+
- On the **SSH/SSL** tab, clear the **Use SSL** checkbox.
114+
- If a **Download missing driver files** warning is displayed, click **Download** to acquire the driver files.
115+
116+
10. Click **Test Connection** to validate the connection to the {{{ .premium }}} instance.
117+
118+
11. Click **OK** to save the connection configuration.
119+
78120
</div>
79121
<div label="TiDB Cloud Dedicated">
80122

develop/dev-guide-gui-dbeaver.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In this tutorial, you can learn how to connect to TiDB using DBeaver Community.
1212

1313
> **Note:**
1414
>
15-
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
15+
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
1616
1717
## Prerequisites
1818

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

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

89+
</div>
90+
<div label="{{{ .premium }}}">
91+
92+
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.
93+
94+
2. In the left navigation pane, click **Settings** > **Networking**.
95+
96+
3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.
97+
98+
Ensure that your client IP address is added to the access list.
99+
100+
4. In the left navigation pane, click **Overview** to return to the instance overview page.
101+
102+
5. Click **Connect** in the upper-right corner. A connection dialog is displayed.
103+
104+
6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.
105+
106+
- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
107+
- If you have not set a password yet, click **Set Root Password** in the dialog.
108+
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
109+
- 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).
110+
111+
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**.
112+
113+
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:
114+
115+
| DBeaver field | {{{ .premium }}} connection string |
116+
|---------------| ------------------------------- |
117+
| Server Host | `{host}` |
118+
| Port | `{port}` |
119+
| Username | `{user}` |
120+
| Password | `{password}` |
121+
122+
Keep the SSL settings disabled.
123+
124+
9. Click **Test Connection** to validate the connection to the {{{ .premium }}} instance.
125+
126+
10. Click **Finish** to save the connection configuration.
127+
89128
</div>
90129
<div label="TiDB Cloud Dedicated">
91130

develop/dev-guide-gui-mysql-workbench.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ In this tutorial, you can learn how to connect to TiDB using MySQL Workbench.
1717

1818
> **Note:**
1919
>
20-
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
20+
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
2121
2222
## Prerequisites
2323

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

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

80+
</div>
81+
<div label="{{{ .premium }}}">
82+
83+
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.
84+
85+
2. In the left navigation pane, click **Settings** > **Networking**.
86+
87+
3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.
88+
89+
Ensure that your client IP address is added to the access list.
90+
91+
4. In the left navigation pane, click **Overview** to return to the instance overview page.
92+
93+
5. Click **Connect** in the upper-right corner. A connection dialog is displayed.
94+
95+
6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.
96+
97+
- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
98+
- If you have not set a password yet, click **Set Root Password** in the dialog.
99+
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
100+
- 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).
101+
102+
7. Launch MySQL Workbench and click **+** near the **MySQL Connections** title.
103+
104+
8. In the **Setup New Connection** dialog, configure the following connection parameters:
105+
106+
- **Connection Name**: give this connection a meaningful name.
107+
- **Hostname**: enter the `HOST` parameter from the TiDB Cloud connection dialog.
108+
- **Port**: enter the `PORT` parameter from the TiDB Cloud connection dialog.
109+
- **Username**: enter the `USERNAME` parameter from the TiDB Cloud connection dialog.
110+
- **Password**: click **Store in Keychain ...** or **Store in Vault**, enter the password of the {{{ .premium }}} instance, and then click **OK** to store the password.
111+
112+
9. Click **Test Connection** to validate the connection to the {{{ .premium }}} instance.
113+
114+
10. If the connection test is successful, you can see the **Successfully made the MySQL connection** message. Click **OK** to save the connection configuration.
115+
80116
</div>
81117
<div label="TiDB Cloud Dedicated">
82118

develop/dev-guide-gui-navicat.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In this tutorial, you can learn how to connect to TiDB using Navicat.
1212

1313
> **Note:**
1414
>
15-
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
15+
> This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
1616
1717
## Prerequisites
1818

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

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

76+
</div>
77+
<div label="{{{ .premium }}}">
78+
79+
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.
80+
81+
2. In the left navigation pane, click **Settings** > **Networking**.
82+
83+
3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.
84+
85+
Ensure that your client IP address is added to the access list.
86+
87+
4. In the left navigation pane, click **Overview** to return to the instance overview page.
88+
89+
5. Click **Connect** in the upper-right corner. A connection dialog is displayed.
90+
91+
6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.
92+
93+
- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
94+
- If you have not set a password yet, click **Set Root Password** in the dialog.
95+
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
96+
- 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).
97+
98+
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.
99+
100+
8. In the **New Connection (TiDB)** dialog, configure the following connection parameters:
101+
102+
- **Connection Name**: give this connection a meaningful name.
103+
- **Host**: enter the `HOST` parameter from the TiDB Cloud connection dialog.
104+
- **Port**: enter the `PORT` parameter from the TiDB Cloud connection dialog.
105+
- **User Name**: enter the `USERNAME` parameter from the TiDB Cloud connection dialog.
106+
- **Password**: enter the password of the {{{ .premium }}} instance.
107+
108+
9. Click the **SSL** tab and clear the **Use SSL** checkbox.
109+
110+
10. Click **Test Connection** to validate the connection to the {{{ .premium }}} instance.
111+
112+
11. If the connection test is successful, you can see the **Connection Successful** message. Click **OK** to finish the connection configuration.
113+
76114
</div>
77115
<div label="TiDB Cloud Dedicated">
78116

develop/dev-guide-gui-vscode-sqltools.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In this tutorial, you can learn how to connect to TiDB using Visual Studio Code.
1212

1313
> **Note:**
1414
>
15-
> - This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
15+
> - This tutorial is compatible with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, TiDB Cloud Dedicated, and TiDB Self-Managed.
1616
> - 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).
1717
1818
## Prerequisites
@@ -93,6 +93,49 @@ Connect to TiDB depending on the TiDB deployment option you have selected.
9393

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

96+
</div>
97+
<div label="{{{ .premium }}}">
98+
99+
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.
100+
101+
2. In the left navigation pane, click **Settings** > **Networking**.
102+
103+
3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.
104+
105+
Ensure that your client IP address is added to the access list.
106+
107+
4. In the left navigation pane, click **Overview** to return to the instance overview page.
108+
109+
5. Click **Connect** in the upper-right corner. A connection dialog is displayed.
110+
111+
6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.
112+
113+
- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
114+
- If you have not set a password yet, click **Set Root Password** in the dialog.
115+
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
116+
- 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).
117+
118+
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.
119+
120+
8. In the setting pane, configure the following connection parameters:
121+
122+
- **Connect using**: select **Server and Port**.
123+
- **Server Address**: enter the `host` parameter from the TiDB Cloud connection dialog.
124+
- **Port**: enter the `port` parameter from the TiDB Cloud connection dialog.
125+
- **Database**: enter the database that you want to connect to.
126+
- **Username**: enter the `user` parameter from the TiDB Cloud connection dialog.
127+
- **Password mode**: select **SQLTools Driver Credentials**.
128+
- In the **MySQL driver specific options** area, configure the following parameters:
129+
130+
- **Authentication Protocol**: select **default**.
131+
- **SSL**: select **Disabled**.
132+
133+
9. Click **TEST CONNECTION** to validate the connection to the {{{ .premium }}} instance.
134+
135+
10. In the **SQLTools Driver Credentials** dialog, enter the password.
136+
137+
11. If the connection test is successful, click **SAVE CONNECTION** to save the connection configuration.
138+
96139
</div>
97140
<div label="TiDB Cloud Dedicated">
98141

develop/dev-guide-sample-application-aws-lambda.md

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ In this tutorial, you can learn how to use TiDB and mysql2 in AWS Lambda Functio
1717

1818
> **Note**
1919
>
20-
> This tutorial works with {{{ .starter }}}, {{{ .essential }}}, and TiDB Self-Managed.
20+
> This tutorial works with {{{ .starter }}}, {{{ .essential }}}, {{{ .premium }}}, and TiDB Self-Managed.
2121
2222
## Prerequisites
2323

@@ -99,7 +99,47 @@ Connect to TiDB depending on the TiDB deployment option you've selected.
9999
"TIDB_HOST": "{gateway-region}.aws.tidbcloud.com",
100100
"TIDB_PORT": "4000",
101101
"TIDB_USER": "{prefix}.root",
102-
"TIDB_PASSWORD": "{password}"
102+
"TIDB_PASSWORD": "{password}",
103+
"TIDB_ENABLE_SSL": "true"
104+
}
105+
}
106+
```
107+
108+
Replace the placeholders in `{}` with the values obtained in the connection dialog.
109+
110+
</div>
111+
112+
<div label="{{{ .premium }}}">
113+
114+
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.
115+
116+
2. In the left navigation pane, click **Settings** > **Networking**.
117+
118+
3. On the **Networking** page, click **Enable** for **Public Endpoint**, and then click **Add IP Address**.
119+
120+
Ensure that your client IP address is added to the access list.
121+
122+
4. In the left navigation pane, click **Overview** to return to the instance overview page.
123+
124+
5. Click **Connect** in the upper-right corner. A connection dialog is displayed.
125+
126+
6. In the connection dialog, select **Public** from the **Connection Type** drop-down list.
127+
128+
- If a message indicates that the public endpoint is still being enabled, wait until the process completes.
129+
- If you have not set a password yet, click **Set Root Password** in the dialog.
130+
- If you need to verify the server certificate or if the connection fails and requires a CA certificate, click **CA cert** to download it.
131+
- 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).
132+
133+
7. Copy and paste the corresponding connection string into `env.json`. The following is an example:
134+
135+
```json
136+
{
137+
"Parameters": {
138+
"TIDB_HOST": "{host}",
139+
"TIDB_PORT": "4000",
140+
"TIDB_USER": "root",
141+
"TIDB_PASSWORD": "{password}",
142+
"TIDB_ENABLE_SSL": "false"
103143
}
104144
}
105145
```
@@ -118,7 +158,8 @@ Copy and paste the corresponding connection string into `env.json`. The followin
118158
"TIDB_HOST": "{tidb_server_host}",
119159
"TIDB_PORT": "4000",
120160
"TIDB_USER": "root",
121-
"TIDB_PASSWORD": "{password}"
161+
"TIDB_PASSWORD": "{password}",
162+
"TIDB_ENABLE_SSL": "false"
122163
}
123164
}
124165
```
@@ -273,10 +314,10 @@ function connect() {
273314
user: process.env.TIDB_USER, // TiDB user, for example: {prefix}.root
274315
password: process.env.TIDB_PASSWORD, // TiDB password
275316
database: process.env.TIDB_DATABASE || 'test', // TiDB database name, default: test
276-
ssl: {
317+
ssl: process.env.TIDB_ENABLE_SSL === 'true' ? {
277318
minVersion: 'TLSv1.2',
278319
rejectUnauthorized: true,
279-
},
320+
} : null,
280321
connectionLimit: 1, // Setting connectionLimit to "1" in a serverless function environment optimizes resource usage, reduces costs, ensures connection stability, and enables seamless scalability.
281322
maxIdle: 1, // max idle connections, the default value is the same as `connectionLimit`
282323
enableKeepAlive: true,

0 commit comments

Comments
 (0)