tencent cloud

Feedback

Connecting to Cluster at Private or Public Network Address from Windows CVM Instance

Last updated: 2024-09-11 16:56:22
    TDSQL-C for MySQL supports instance-level dedicated IP address, which allows you to connect to the instance through the IP address of a read-write or read-only instance in a cluster. This document describes how to connect to an instance in a cluster from a Windows CVM instance via private or public network.

    Prerequisites

    To prepare your TDSQL-C for MySQL cluster, please refer to Creating a Cluster.
    You have created a database cluster account. For more information, see Creating Account.

    Step 1. Query the private and public IP address of the instance to be connected.

    1. Log in to the TDSQL-C for MySQL console.
    2. On the cluster list page, proceed based on the actually used view mode.
    Tab view
    List view
    1. Click the target cluster in the cluster list on the left to enter the cluster management page.
    2. On the Cluster Details tab, find the target instance, and view its private and public network IP address under Network.
    
    1. Find the target cluster in the cluster list and click the Cluster ID or Manage in the Operation column to enter the cluster management page.
    2. On the cluster management page, select the read-write or read-only instance on the instance list page, and you can view the instance private and public network IP address under Private/Public Network Address.
    

    Step 2. Connect to the target instance in a cluster

    1. Log in to a Windows CVM instance. For more information, see Quickly Configuring Windows CVM Instance.
    2. Download a standard SQL client.
    Note:
    We recommend that you download MySQL Workbench. Click here and download an installer based on your operating system.
    
    3. Login, Sign Up, and No thanks, just start my download. will appear on the page. Select No thanks, just start my download. to download quickly.
    
    4. Install MySQL Workbench on this CVM instance.
    Note:
    Microsoft .NET Framework 4.5 and Visual C++ Redistributable for Visual Studio 2015 are required for the installation.
    You can click Download Prerequisites in the MySQL Workbench installation wizard to enter the corresponding page to download and install them. Then, install MySQL Workbench.
    
    5. Open MySQL Workbench, select Database > Connect to Database, enter the private (or public) network address, username, and password of your TDSQL-C for MySQL cluster and click OK to log in.
    
    
    Parameter
    Description
    Hostname
    Enter the public network address of the target TDSQL-C for MySQL instance in a cluster as instructed in Step 1. For public network address, check whether it has been enabled as instructed in Enabling/Disabling Public Network Address.
    Port
    Private (or public) network port.
    Username
    Enter the account name configured when creating the database account, which is the default account root here for example.
    Password
    Enter the password corresponding to the username. If you forgot the password, reset it in the console.
    6. After successful login, a page will appear, where you can view the modes and objects of the database, create tables, and perform operations such as data insertion and query.
    

    FAQs

    How do I find the account name or reset the password to log in to the cluster?

    You can view the account name you created for cluster connection under Account Management on the cluster management page in the TDSQL-C for MySQL console. If you forgot the password, perform the Reset Password operation to change the password.
    
    

    Do I need to configure a security group for the TDSQL-C for MySQL cluster when connecting to it over the private or public network?

    Yes. For detailed directions, see Creating and Managing TencentDB Security Groups. Note that if the public network access is enabled for connection over the public network, the private network port needs to be opened in the configured security group rule.

    What should I do if I can't log in to the Linux CVM instance because the security group rules of the instance don't match properly?

    If the security group rules of the Linux CVM instance don't match properly (for example, the corresponding port is not opened), and you can't log in to the instance, you can use the Security Group (Port) Verification Tool to check the connectivity of the security group.
    
    You can locate the possible causes of the login failure through quick check.
    
    Then, on the CVM instance details page, select Security Group > Edit Rule and open the corresponding port. For detailed directions, see Adding Security Group Rules.

    What settings may cause a cluster connection failure?

    Check whether the CVM instance and the TDSQL-C for MySQL cluster are in the same VPC in the same region under the same Tencent Cloud account. If any of these three prerequisites is not meet, the cluster cannot be connected.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support