Skip to content

Latest commit

 

History

History
165 lines (99 loc) · 8.87 KB

dev-guide-gui-navicat.md

File metadata and controls

165 lines (99 loc) · 8.87 KB
title summary
Connect to TiDB with Navicat
Learn how to connect to TiDB using Navicat.

Connect to TiDB with Navicat

TiDB is a MySQL-compatible database, and Navicat is a GUI tool set for database users. This tutorial uses the Navicat Premium tool to connect to TiDB.

In this tutorial, you can learn how to connect to your TiDB cluster using Navicat.

Note:

This tutorial is compatible with TiDB Cloud Serverless, TiDB Cloud Dedicated, and TiDB Self-Managed.

Prerequisites

To complete this tutorial, you need:

  • Navicat Premium 17.1.6 or later versions.
  • A paid account for Navicat Premium.
  • A TiDB cluster.

If you don't have a TiDB cluster, you can create one as follows:

If you don't have a TiDB cluster, you can create one as follows:

Connect to TiDB

Connect to your TiDB cluster depending on the TiDB deployment option you have selected.

  1. Navigate to the 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.

    • Connection Type is set to Public.
    • Branch is set to main.
    • Connect With is set to Navicat.
    • Operating System matches your environment.
  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.

  5. Launch Navicat Premium, click Connection in the upper-left corner, select PingCAP from the Venfor Filter list, and double-click TiDB in the right panel.

    Navicat: add new connection

  6. 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 TiDB Cloud Serverless cluster.

    Navicat: configure connection general panel for TiDB Cloud Serverless

  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 Cloud Serverless

  8. Click Test Connection to validate the connection to the TiDB Cloud Serverless cluster.

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

  1. Navigate to the 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. In the connection dialog, select Public from the Connection Type drop-down list.

    If you have not configured the IP access list, click Configure IP Access List or follow the steps in Configure an IP Access List to configure it before your first connection.

    In addition to the Public connection type, TiDB Dedicated supports Private Endpoint and VPC Peering connection types. For more information, see Connect to Your TiDB Dedicated Cluster.

  4. Click CA cert to download the CA certificate.

  5. Launch Navicat Premium, click Connection in the upper-left corner, select PingCAP from the Venfor Filter list, and double-click TiDB in the right panel.

    Navicat: add new connection

  6. 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 TiDB Cloud Dedicated cluster.

    Navicat: configure connection general panel for TiDB Cloud Dedicated

  7. Click the SSL tab and select Use SSL, Use authentication, and Verify server certificate against CA checkboxes. Then, select the CA file downloaded in step 4 into the CA Certificate field.

    Navicat: configure connection SSL panel for TiDB Cloud Dedicated

  8. Test Connection to validate the connection to the TiDB Cloud Dedicated cluster.

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

  1. Launch Navicat Premium, click Connection in the upper-left corner, select PingCAP from the Venfor Filter list, and double-click TiDB in the right panel.

    Navicat: add new connection

  2. In the New Connection (TiDB) dialog, configure the following connection parameters:

    • Connection Name: give this connection a meaningful name.
    • Host: enter the IP address or domain name of your TiDB Self-Managed cluster.
    • Port: enter the port number of your TiDB Self-Managed cluster.
    • User Name: enter the username to use to connect to your TiDB.
    • Password: enter the password to use to connect to your TiDB.

    Navicat: configure connection general panel for self-hosted TiDB

  3. Click Test Connection to validate the connection to the TiDB Self-Managed cluster.

  4. If the connection test is successful, you can see the Connection Successful message. Click OK to finish the connection configuration.

Next steps

Need help?

Ask the community on Discord or Slack, or submit a support ticket.

Ask the community on Discord or Slack, or submit a support ticket.