-
Notifications
You must be signed in to change notification settings - Fork 688
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
feat: Developer Guide - GUI - DBeaver #14927
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0f6583a
stash: dbeaver
0ea4824
Merge branch 'master' into feat-gui-dbeaver
e187082
feat: gui doc dbeaver
7514f5b
Update dev-guide-gui-dbeaver.md
shizn af38f67
Update TOC.md
shizn e913b84
Update TOC-tidb-cloud.md
shizn 6dc4eb8
Merge pull request #5 from shizn/patch-1
f206049
update TOC and merge master
Oreoxmt 0655f70
update dev-guide-third-party-support
Oreoxmt 3e66e9d
update wording and screenshots
Oreoxmt 2454417
Merge pull request #7 from Oreoxmt/update-feat-gui-dbeaver
88124e9
Merge branch 'master' into feat-gui-dbeaver
2764f69
update: bump dbeaver tested version to 23.0.3
440c64a
Apply suggestions from code review
Oreoxmt 8857223
Apply suggestions from code review
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
--- | ||
title: Connect to TiDB with DBeaver | ||
summary: Learn how to connect to TiDB using DBeaver Community. | ||
--- | ||
|
||
# Connect to TiDB with DBeaver | ||
|
||
TiDB is a MySQL-compatible database, and [DBeaver Community](https://dbeaver.io/download/) is a free cross-platform database tool for developers, database administrators, analysts, and everyone working with data. | ||
|
||
In this tutorial, you can learn how to connect to your TiDB cluster using DBeaver Community. | ||
|
||
> **Note:** | ||
> | ||
> This tutorial is compatible with TiDB Serverless, TiDB Dedicated, and TiDB Self-Hosted. | ||
|
||
## Prerequisites | ||
|
||
To complete this tutorial, you need: | ||
|
||
- [DBeaver Community **23.0.3** or higher](https://dbeaver.io/download/). | ||
Icemap marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- A TiDB cluster. | ||
|
||
<CustomContent platform="tidb"> | ||
|
||
**If you don't have a TiDB cluster, you can create one as follows:** | ||
|
||
- (Recommended) Follow [Creating a TiDB Serverless cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. | ||
- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. | ||
|
||
</CustomContent> | ||
<CustomContent platform="tidb-cloud"> | ||
|
||
**If you don't have a TiDB cluster, you can create one as follows:** | ||
|
||
- (Recommended) Follow [Creating a TiDB Serverless cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. | ||
- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. | ||
|
||
</CustomContent> | ||
|
||
## Connect to TiDB | ||
|
||
Connect to your TiDB cluster depending on the TiDB deployment option you've selected. | ||
|
||
<SimpleTab> | ||
<div label="TiDB Serverless"> | ||
|
||
1. Navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page, and then click the name of your target cluster to go to its overview page. | ||
|
||
2. Click **Connect** in the upper-right corner. A connection dialog is displayed. | ||
|
||
3. Ensure the configurations in the connection dialog match your operating environment. | ||
|
||
- **Endpoint Type** is set to `Public` | ||
- **Connect With** is set to `JDBC` | ||
- **Operating System** matches your environment. | ||
|
||
4. Click **Create 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. | ||
|
||
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. | ||
|
||
7. In the **Authentication (Database Native)** section, enter your **Username** and **Password**. An example is as follows: | ||
|
||
![Configure connection settings for TiDB Serverless](/media/develop/dbeaver-connection-settings-serverless.jpg) | ||
|
||
8. Click **Test Connection** to validate the connection to the TiDB Serverless cluster. | ||
|
||
If the **Download driver files** dialog is displayed, click **Download** to get the driver files. | ||
|
||
![Download driver files](/media/develop/dbeaver-download-driver.jpg) | ||
|
||
If the connection test is successful, the **Connection test** dialog is displayed as follows. Click **OK** to close it. | ||
|
||
![Connection test result](/media/develop/dbeaver-connection-test.jpg) | ||
|
||
9. Click **Finish** to save the connection configuration. | ||
|
||
</div> | ||
<div label="TiDB Dedicated"> | ||
|
||
1. Navigate to the [**Clusters**](https://tidbcloud.com/console/clusters) page, and then click the name of your target cluster to go to its overview page. | ||
|
||
2. Click **Connect** in the upper-right corner. A connection dialog is displayed. | ||
|
||
3. Click **Allow Access from Anywhere**, and then click **Download TiDB cluster CA** to download the CA certificate. | ||
|
||
For more details about how to obtain the connection string, refer to [TiDB Dedicated standard connection](https://docs.pingcap.com/tidbcloud/connect-via-standard-connection). | ||
|
||
4. 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) | ||
|
||
5. Copy and paste the appropriate connection string into the DBeaver connection panel. The mappings between DBeaver fields and TiDB Dedicated connection string are as follows: | ||
|
||
| DBeaver field | TiDB Dedicated connection string | | ||
|---------------| ------------------------------- | | ||
| Server Host | `{host}` | | ||
| Port | `{port}` | | ||
| Username | `{user}` | | ||
| Password | `{password}` | | ||
|
||
An example is as follows: | ||
|
||
![Configure connection settings for TiDB Dedicated](/media/develop/dbeaver-connection-settings-dedicated.jpg) | ||
|
||
6. Click **Test Connection** to validate the connection to the TiDB Dedicated cluster. | ||
|
||
If the **Download driver files** dialog is displayed, click **Download** to get the driver files. | ||
|
||
![Download driver files](/media/develop/dbeaver-download-driver.jpg) | ||
|
||
If the connection test is successful, the **Connection test** dialog is displayed as follows. Click **OK** to close it. | ||
|
||
![Connection test result](/media/develop/dbeaver-connection-test.jpg) | ||
|
||
7. Click **Finish** to save the connection configuration. | ||
|
||
</div> | ||
<div label="TiDB Self-Hosted"> | ||
|
||
1. 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) | ||
|
||
2. Configure the following connection parameters: | ||
|
||
- **Server Host**: The IP address or domain name of your TiDB Self-Hosted cluster. | ||
- **Port**: The port number of your TiDB Self-Hosted cluster. | ||
- **Username**: The username to use to connect to your TiDB Self-Hosted cluster. | ||
- **Password**: The password of the username. | ||
|
||
An example is as follows: | ||
|
||
![Configure connection settings for TiDB Self-Hosted](/media/develop/dbeaver-connection-settings-self-hosted.jpg) | ||
|
||
3. Click **Test Connection** to validate the connection to the TiDB Self-Hosted cluster. | ||
|
||
If the **Download driver files** dialog is displayed, click **Download** to get the driver files. | ||
|
||
![Download driver files](/media/develop/dbeaver-download-driver.jpg) | ||
|
||
If the connection test is successful, the **Connection test** dialog is displayed as follows. Click **OK** to close it. | ||
|
||
![Connection test result](/media/develop/dbeaver-connection-test.jpg) | ||
|
||
4. Click **Finish** to save the connection configuration. | ||
|
||
</div> | ||
</SimpleTab> | ||
|
||
## Next steps | ||
|
||
- Learn more usage of DBeaver from [the documentation of DBeaver](https://github.com/dbeaver/dbeaver/wiki). | ||
- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). | ||
- Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. | ||
|
||
## Need help? | ||
|
||
Ask questions on the [Discord](https://discord.gg/vYU9h56kAX), or [create a support ticket](https://support.pingcap.com/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Preview: https://pingcap-docs-website-scaffold-git-preview-pingca-518ba9-oreoxmt.vercel.app/tidb/dev/dev-guide-gui-dbeaver