tencent cloud

Connect to Instances
Last updated:2026-02-10 10:25:38
Connect to Instances
Last updated: 2026-02-10 10:25:38

Connection Methods

The method to connect to TDSQL Boundless is as follows:
Private Network Connection (Recommended): Connect to the cloud database via the private network address. Use CVM to directly connect to the cloud database's private network address. This connection method uses the private network's high-speed network, resulting in low latency.
CVM and database must be under the same account and within the same VPC (to ensure the same region).
The private network address is provided by default and can be viewed in the instance list of the TDSQL Boundless console.
Note:
For CVM and database under different VPCs (including the same account/different accounts, same region/different regions), the private network connection method see CCN.
Public Network Access: TDSQL Boundless by default only provides a private network (VPC) access address to ensure the security and high performance of data transmission. If you need to connect to the database from the public network (public network), it is recommended to use Tencent Cloud load balancing (CLB) as a transit bridge.

Preparations

Creating an Account

1. Log in to the TDSQL Boundless console. On the Instance List page, click the Instance ID or Operation in the Manage column to go to the Instance Management page.
2. On the Instance Management page, select the Account Management tab and click Create Account.
3. In the pop-up dialog box, enter the account name, password, and remarks. After verifying that everything is correct, click OK.
4. Accounts created will have the following permissions:
SELECT,UPDATE,INSERT,ALTER,DELETE,CREATE,CREATE VIEW,SHOW DATABASES,INDEX,SHOW VIEW,PROCESS,DROP
After an account is created and the private network address is obtained, you can connect to TDSQL Boundless using third-party tools and program drivers.
For Windows, three methods are used as examples: connection via the command line, connection via the client, and connection via the JDBC driver.
For Linux, command-line connection is taken as an example.

Connecting from the Windows Side

Connecting via the Windows Command Line

1. Open the Windows command line and enter the following command in the correct path of MySQL.
mysql -hprivate_network_address -Pport number -uusername -p.
Enter password: ********** (enter the password).
2. After you enter the relevant code correctly, the following information is displayed, indicating successful connection to the database. Next, you can proceed with related operations in the database.
Welcome to the MySQL monitor. Commands end with ; or \\g.

Connecting via the Windows Client

1. Download a standard SQL client, such as MySQL Workbench or SQLyog. This document uses SQLyog as an example.
2. Open SQLyog, choose File > New Connection, enter the corresponding host address, port number, username, and password, and click Connect.
Host: Enter the private network address obtained earlier.
User Name: Enter the created account name.
Password: Enter the corresponding password of the account. If you forget your password, you can go to the console to modify it.
Port: Enter the port corresponding to the address.


3. Connection succeeded page is as shown in the following figure. On this page, you can perform related operations in the database.



JDBC Driver Connection for Windows

TDSQL Boundless supports programmatic driver connectivity. This document uses Java connecting via JDBC Driver for MySQL (Connector/J) as an example.
1. Download a JDBC jar package at MySQL's official website. Import it to the library referenced by Java.
2. Call JDBC codes as follows:
public static final String url = "private network address";
public static final String name = "com.mysql.jdbc.Driver"; //Call the JDBC driver.
public static final String user = "username".
public static final String password = "password".
//JDBC
Class.forName("com.mysql.jdbc.Driver");
Connection conn=DriverManager.getConnection("url, user, password");
//
conn.close();
3. After the connection is successful, you can proceed with other operations in the database.

Connecting from the Linux Side

Command Line Connection for Linux

This document uses the CentOS 7.2 64-bit system in Tencent CVMs as an example. See Purchasing Method for purchasing CVMs.
1. Log in to Linux, enter the command yum install mysql, and use yum, the package management software that comes with CentOS, to download and install the MySQL client from the Tencent Cloud mirror source.



2. When the command line shows "complete", it indicates that the MySQL client installation is complete.
3. Enter the command mysql -h private network address -P port -u username -p to connect to the database, then you can proceed with sharding operations.
The following figure uses show databases; as an example.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback