Help Center/ GaussDB(for MySQL)/ Getting Started/ Buying a DB Instance and Connecting to It Using MySQL-Front
Updated on 2024-09-05 GMT+08:00

Buying a DB Instance and Connecting to It Using MySQL-Front

After you buy a DB instance, you can log in to a Windows ECS, install MySQL-Front on the ECS, and use a private IP address to connect to the DB instance through MySQL-Front.

Step 1: Buy a DB Instance

Step 2: Buy an ECS

Step 3: Test Connectivity and Install MySQL-Front

Step 4: Use MySQL-Front to Connect to the DB Instance

Step 1: Buy a DB Instance

  1. Go to the Buy DB Instance page.
  2. Configure the instance information and click Next.
    Figure 1 Selecting a DB engine version

    Figure 2 Selecting specifications
    Figure 3 Configuring a network
    Figure 4 Setting a password
  3. Check the purchased DB instance.
    Figure 5 Purchase succeeded
  4. Click the DB instance name to enter the Basic Information page.
  5. In the Network Information area, obtain the private IP address and database port.
    Figure 6 Viewing the private IP address and database port

Step 2: Buy an ECS

  1. Log in to the management console and check whether there is an ECS available.
  2. Buy an ECS and select Windows as its OS.

    To download a MySQL client to the ECS, bind an EIP to the ECS. The ECS must be in the same region, VPC, and security group as the DB instance for mutual communications.

    For details about how to purchase a Windows ECS, see Purchasing an ECS in Elastic Cloud Server Getting Started.

  3. On the ECS Information page, view the region and VPC of the ECS.
    Figure 7 Viewing basic information about the ECS

  4. On the Basic Information page of the DB instance, view the region and VPC of the DB instance.
    Figure 8 Viewing basic information about the DB instance

  5. Check whether the ECS and DB instance are in the same region and VPC.
    • If they are in different regions, buy another ECS or DB instance. The ECS and DB instance in different regions cannot communicate with each other. To reduce network latency, deploy your DB instance in the region nearest to your workloads.
    • If they are are in different VPCs, change the VPC of the ECS to that of the DB instance. For details, see Changing a VPC.

Step 3: Test Connectivity and Install MySQL-Front

  1. Log in to the ECS. For details, see Logging In to a Windows ECS Using VNC in Elastic Cloud Server User Guide.
  2. On the ECS, check whether it can connect to the DB instance using the private IP address and port obtained in 5.

    telnet private_IP_address port

    If the message "command not found" is displayed, install the Telnet tool based on the OS used by the ECS.

    • If the ECS can connect to the DB instance, no further action is required.
    • If the ECS cannot connect to the DB instance, check the security group rules.
      • If in the security group of the ECS, there is no outbound rule with Destination set to 0.0.0.0/0 and Protocol & Port set to All, add an outbound rule for the private IP address and port of the DB instance.
      • On the Inbound Rules page of the DB instance security group, add an inbound rule for the private IP address and port of the ECS.
  3. Open a browser, and download and install the MySQL-Front tool on the ECS (version 5.4 is used as an example).

Step 4: Use MySQL-Front to Connect to the DB Instance

  1. Start MySQL-Front.
  2. In the displayed dialog box, click New.
  3. Enter the information about the DB instance to be connected and click Ok.
    Table 1 Parameter description

    Parameter

    Description

    Name

    Database connection task name. If you do not specify this parameter, it will be the same as that configured for Host by default.

    Host

    Private IP address.

    Port

    Database port. The default value is 3306.

    User

    Account name of the DB instance. The default value is root.

    Password

    Password of the account for accessing the DB instance.

  4. In the displayed window, select the connection that you created and click Open.
  5. If the connection information is correct, the DB instance is successfully connected.