Skip to content

Commit

Permalink
update serverless connect steps (#15592)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyangyu authored Dec 14, 2023
1 parent 302dfef commit be9e59f
Show file tree
Hide file tree
Showing 27 changed files with 102 additions and 77 deletions.
2 changes: 1 addition & 1 deletion develop/dev-guide-build-cluster-in-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This document walks you through the quickest way to get started with TiDB Cloud.

7. In the dialog, select your preferred connection method and operating system to get the corresponding connection string. This document uses MySQL client as an example.

8. Click **Create password** to generate a random password. The generated password will not show again, so save your password in a secure location. If you do not set a root password, you cannot connect to the cluster.
8. Click **Generate Password** to generate a random password. The generated password will not show again, so save your password in a secure location. If you do not set a root password, you cannot connect to the cluster.

<CustomContent platform="tidb">

Expand Down
9 changes: 5 additions & 4 deletions develop/dev-guide-gui-datagrip.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`
- **Connect With** is set to `JDBC`
- **Branch** is set to `main`
- **Connect With** is set to `DataGrip`
- **Operating System** matches your environment.

4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. Launch DataGrip and create a project to manage your connections.

Expand All @@ -73,7 +74,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele

![Select a data source in DataGrip](/media/develop/datagrip-data-source-select.jpg)

7. Copy the JDBC string from the TiDB Cloud connection dialog and replace `<your_password>` with your actual password. Then, paste it into the **URL** field, and the remaining parameters will be auto-populated. An example result is as follows:
7. Copy the connection string from the TiDB Cloud connection dialog. Then, paste it into the **URL** field, and the remaining parameters will be auto-populated. An example result is as follows:

![Configure the URL field for TiDB Serverless](/media/develop/datagrip-url-paste.jpg)

Expand Down
9 changes: 5 additions & 4 deletions develop/dev-guide-gui-dbeaver.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,21 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`
- **Connect With** is set to `JDBC`
- **Branch** is set to `main`
- **Connect With** is set to `DBeaver`
- **Operating System** matches your environment.

4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. 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**.

![Select TiDB as the database in DBeaver](/media/develop/dbeaver-select-database.jpg)

6. Copy the JDBC string from the TiDB Cloud connection dialog. In DBeaver, select **URL** for **Connect by** and paste the JDBC string into the **URL** field. You don't need to replace the `<your_password>` placeholder in the string with your actual password, because DBeaver reads username and password from the **Authentication (Database Native)** section.
6. Copy the connection string from the TiDB Cloud connection dialog. In DBeaver, select **URL** for **Connect by** and paste the connection string into the **URL** field.

7. In the **Authentication (Database Native)** section, enter your **Username** and **Password**. An example is as follows:

Expand Down
13 changes: 7 additions & 6 deletions develop/dev-guide-gui-mysql-workbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`.
- **Connect With** is set to `General`.
- **Branch** is set to `main`.
- **Connect With** is set to `MySQL Workbench`.
- **Operating System** matches your environment.

4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. Launch MySQL Workbench and click **+** near the **MySQL Connections** title.

Expand All @@ -72,9 +73,9 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se
6. 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 `user` parameter from the TiDB Cloud connection dialog.
- **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 ...**, enter the password of the TiDB Serverless cluster, and then click **OK** to store the password.

![MySQL Workbench: store the password of TiDB Serverless in keychain](/media/develop/mysql-workbench-store-password-in-keychain.png)
Expand Down
15 changes: 8 additions & 7 deletions develop/dev-guide-gui-navicat.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`.
- **Connect With** is set to `General`.
- **Branch** is set to `main`.
- **Connect With** is set to `Navicat`.
- **Operating System** matches your environment.

4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. Launch Navicat for MySQL, click **Connection** in the upper-left corner, and select **MySQL** from the drop-down list.

Expand All @@ -73,14 +74,14 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se
6. In the **New Connection (MySQL)** 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 `user` parameter from the TiDB Cloud connection dialog.
- **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 TiDB Serverless cluster.

![Navicat: configure connection general panel for TiDB Serverless](/media/develop/navicat-connection-config-serverless-general.png)

7. Click the **SSL** tab and select **Use SSL**, **Use authentication**, and **Verify server certificate against CA** checkboxes. Then, select the `ssl_ca` file from the TiDB Cloud connection dialog into the **CA Certificate** field.
7. Click the **SSL** tab and select **Use SSL**, **Use authentication**, and **Verify server certificate against CA** checkboxes. Then, select the `CA` file from the TiDB Cloud connection dialog into the **CA Certificate** field.

![Navicat: configure connection SSL panel for TiDB Serverless](/media/develop/navicat-connection-config-serverless-ssl.png)

Expand Down
17 changes: 9 additions & 8 deletions develop/dev-guide-gui-vscode-sqltools.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,19 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`.
- **Connect With** is set to `General`.
- **Branch** is set to `main`.
- **Connect With** is set to `VS Code`.
- **Operating System** matches your environment.

> **Tip:**
>
> If your VS Code is running on a remote development environment, select the remote operating system from the list. For example, if you are using Windows Subsystem for Linux (WSL), switch to the corresponding Linux distribution. This is not necessary if you are using GitHub Codespaces.
4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. 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.

Expand All @@ -77,19 +78,19 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se
- **Connection name**: give this connection a meaningful name.
- **Connection group**: (optional) give this group of connections a meaningful name. Connections with the same group name will be grouped together.
- **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.
- **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.
- **Username**: enter the `USERNAME` 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 **Enabled**. TiDB Serverless requires a secure connection. In the **SSL Options (node.TLSSocket)** area, configure the **Certificate Authority (CA) Certificate File** field as the `ssl_ca` parameter from the TiDB Cloud connection dialog.
- **SSL**: select **Enabled**. TiDB Serverless requires a secure connection. In the **SSL Options (node.TLSSocket)** area, configure the **Certificate Authority (CA) Certificate File** field as the `CA` parameter from the TiDB Cloud connection dialog.

> **Note:**
>
> If you are running on Windows or GitHub Codespaces, you can leave **SSL** blank. By default SQLTools trusts well-known CAs curated by Mozilla. For more information, see [TiDB Serverless root certificate management](https://docs.pingcap.com/tidbcloud/secure-connections-to-serverless-clusters#root-certificate-management).
> If you are running on Windows or GitHub Codespaces, you can leave **SSL** blank. By default SQLTools trusts well-known CAs curated by Let's Encrypt. For more information, see [TiDB Serverless root certificate management](https://docs.pingcap.com/tidbcloud/secure-connections-to-serverless-clusters#root-certificate-management).
![VS Code SQLTools: configure connection settings for TiDB Serverless](/media/develop/vsc-sqltools-connection-config-serverless.jpg)

Expand Down
5 changes: 3 additions & 2 deletions develop/dev-guide-sample-application-aws-lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,19 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`
- **Branch** is set to `main`
- **Connect With** is set to `General`
- **Operating System** matches your environment.

> **Note**
>
> In Node.js applications, you don't have to provide an SSL CA certificate, because Node.js uses the built-in [Mozilla CA certificate](https://wiki.mozilla.org/CA/Included_Certificates) by default when establishing the TLS (SSL) connection.
4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip**
>
> If you have generated a password before, you can either use the original password or click **Reset password** to generate a new one.
> If you have generated a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. Copy and paste the corresponding connection string into `env.json`. The following is an example:

Expand Down
7 changes: 4 additions & 3 deletions develop/dev-guide-sample-application-golang-gorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,19 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`
- **Branch** is set to `main`
- **Connect With** is set to `General`
- **Operating System** matches your environment.

> **Tip:**
>
> If your program is running in Windows Subsystem for Linux (WSL), switch to the corresponding Linux distribution.
4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
>
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. Run the following command to copy `.env.example` and rename it to `.env`:

Expand Down
7 changes: 4 additions & 3 deletions develop/dev-guide-sample-application-golang-sql-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,19 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`
- **Branch** is set to `main`
- **Connect With** is set to `General`
- **Operating System** matches your environment.

> **Tip:**
>
> If your program is running in Windows Subsystem for Linux (WSL), switch to the corresponding Linux distribution.
4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
>
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. Run the following command to copy `.env.example` and rename it to `.env`:

Expand Down
5 changes: 3 additions & 2 deletions develop/dev-guide-sample-application-java-hibernate.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,19 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`
- **Branch** is set to `main`
- **Connect With** is set to `General`
- **Operating System** matches your environment.

> **Tip:**
>
> If your program is running in Windows Subsystem for Linux (WSL), switch to the corresponding Linux distribution.
4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. Run the following command to copy `env.sh.example` and rename it to `env.sh`:

Expand Down
5 changes: 3 additions & 2 deletions develop/dev-guide-sample-application-java-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,19 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`
- **Branch** is set to `main`
- **Connect With** is set to `General`
- **Operating System** matches your environment.

> **Tip:**
>
> If your program is running in Windows Subsystem for Linux (WSL), switch to the corresponding Linux distribution.
4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. Run the following command to copy `env.sh.example` and rename it to `env.sh`:

Expand Down
5 changes: 3 additions & 2 deletions develop/dev-guide-sample-application-java-mybatis.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,19 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`
- **Branch** is set to `main`
- **Connect With** is set to `General`
- **Operating System** matches your environment.

> **Tip:**
>
> If your program is running in Windows Subsystem for Linux (WSL), switch to the corresponding Linux distribution.
4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. Run the following command to copy `env.sh.example` and rename it to `env.sh`:

Expand Down
5 changes: 3 additions & 2 deletions develop/dev-guide-sample-application-java-spring-boot.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
3. Ensure the configurations in the connection dialog match your operating environment.

- **Endpoint Type** is set to `Public`
- **Branch** is set to `main`
- **Connect With** is set to `General`
- **Operating System** matches your environment.

> **Tip:**
>
> If your program is running in Windows Subsystem for Linux (WSL), switch to the corresponding Linux distribution.
4. Click **Create password** to create a random password.
4. Click **Generate Password** to create a random password.

> **Tip:**
>
> If you have created a password before, you can either use the original password or click **Reset password** to generate a new one.
> If you have created a password before, you can either use the original password or click **Reset Password** to generate a new one.
5. Run the following command to copy `env.sh.example` and rename it to `env.sh`:

Expand Down
Loading

0 comments on commit be9e59f

Please sign in to comment.