Connecting to a DB Instance from a Windows ECS
You can connect to your DB instance using a Windows ECS with a database client (for example, MySQL-Front) installed over a private IP address.
- Purchasing an ECS
- Querying the Private IP Address of the DB Instance to Be Connected
- Testing Connectivity and Installing MySQL-Front
- Using MySQL-Front to Connect to a DB Instance
Purchasing an ECS
- Log in to the management console and check whether there is an ECS available.
- If there is a Linux ECS, see Connecting to a DB Instance from a Linux ECS.
- If there is a Windows ECS, go to 3.
- If no ECS is available, go to 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 GaussDB(for MySQL) DB instance for mutual communication.
For details about how to purchase a Windows ECS, see "Purchasing an ECS" in Elastic Cloud Server User Guide.
- On the ECS Information page, view the region and VPC of the ECS.
- On the Basic Information page of the GaussDB(for MySQL) DB instance, view the region and VPC of the DB instance.
- Check whether the ECS and GaussDB(for MySQL) DB instance are in the same region and VPC.
- If yes, go to Querying the Private IP Address of the DB Instance to Be Connected.
- If no, purchase another ECS or DB instance. If the ECS and DB instance are in different regions, they cannot communicate with each other. To reduce network latency, deploy your DB instance in the region nearest to your workloads.
- If the ECS and DB instance are in different VPCs, change the VPC of the ECS to that of the DB instance. For details, see "Changing a VPC" in the Elastic Cloud Server User Guide.
Querying the Private IP Address of the DB Instance to Be Connected
- Log in to the management console.
- On the Instances page, click the instance name to go to the Basic Information page.
- In the Network Information area, obtain the private IP address and database port.
Testing Connectivity and Installing MySQL-Front
- Log in to the ECS. For details, see "Login Using VNC" in the Elastic Cloud Server User Guide.
- On the ECS, check whether the private IP address and database port of the DB instance (obtained in Querying the Private IP Address of the DB Instance to Be Connected) can be connected.
telnet private IP address port
Example:
telnet 192.168.0.16 3306
If the message "command not found" is displayed, install the Telnet tool based on the OS used by the ECS.
- If yes, network connectivity is available.
- If no, check the security group rules.
- If Destination is not 0.0.0.0/0 and Protocol & Port is not All on the Outbound Rules page of the ECS, add the private IP address and port of the DB instance to the outbound rules.
- To view the inbound rules of the GaussDB(for MySQL) security group, add the private IP address and port of the ECS to the inbound rules. For details, see Configuring Security Group Rules.
- Open a browser, and download and install the MySQL-Front tool on the ECS.
Using MySQL-Front to Connect to a DB Instance
- Start MySQL-Front.
- In the displayed dialog box, click New.
Figure 1 Connection management
- Enter the information of the DB instance to be connected and click Ok.
Figure 2 Adding an account
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.
- In the displayed window, select the connection that you have created in 3 and click Open. If the connection information is correct, the DB instance is successfully connected.
Figure 3 Opening a session
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.