-
Notifications
You must be signed in to change notification settings - Fork 711
develop: add documents for TiDB Cloud Premium (#22533) #22798
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
Changes from all commits
11edf2d
f472273
4dad7c2
862f9b9
d2e5add
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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: | ||||||
|
|
||||||
|
|
@@ -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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
References
|
||||||
| - If a **Download missing driver files** warning is displayed, click **Download** to acquire the driver files. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use active voice and address the user directly as per the style guide.
Suggested change
References
|
||||||
|
|
||||||
| 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"> | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||
|
|
||||||
|
|
@@ -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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Capitalize the first word of the description in the list for consistency and better grammar.
Suggested change
References
|
||||||
| - **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"> | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||
|
|
||||||
|
|
@@ -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" | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technical inconsistency. Step 6 (line 130) mentions downloading a CA certificate, but the environment variable is set to
Suggested change
References
|
||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
@@ -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" | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
@@ -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, | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use active voice to improve clarity and follow the technical writing principles.
References