MySQL-Front is a Windows front end. It allows you to interact with databases through a GUI, including connecting to a database, running SQL commands, and managing tables and records.
This section uses MySQL-Front 5.4 as an example to describe how to use MySQL-Front to connect to a DB instance through an EIP.
Procedure
Step 1: Bind an EIP to a DB Instance
You can bind an EIP to a DB instance for public access and unbind it as required.
If an EIP has been bound to the DB instance, skip this step.
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page, choose .
- On the Instances page, click the instance name to go to the Basic Information page.
- In the Network Information area, click Bind under Public IP Address (EIP).
- In the displayed dialog box, select an EIP and click OK.
If no EIPs are available, click
View EIP to create an EIP on the network console. After the EIP is created, go back to the
Basic Information page and bind the newly created EIP to the instance.
You need to configure security group rules and enable specific IP addresses and ports to access the DB instance. For details, see Configuring Security Group Rules.
- In the Network Information area, locate Public IP Address (EIP) and view the bound EIP.
Step 2: Query the EIP of the DB Instance to Be Connected
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page, choose .
- On the Instances page, click the instance name to go to the Basic Information page.
- In the Network Information area, obtain the EIP and database port.
Figure 1 Viewing the EIP and database port
Step 3: Test Connectivity and Install MySQL-Front
- Open the cmd window on your local server and check whether the EIP and database port of the DB instance can be connected.
telnet EIP 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 normal.
- If no, 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 the EIP and port of the DB instance to the outbound rules.
Figure 2 Configuring rules of an ECS security group
- If in the security group of the DB instance, there is no inbound rule allowing the access from the EIP and port of the ECS, add the EIP 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 locally (version 5.4 is used as an example).
Step 4: Use MySQL-Front to Connect to the DB Instance
- Start MySQL-Front.
- In the displayed dialog box, click New.
Figure 3 Creating a connection
- Enter the information about the DB instance to be connected and click Ok.
Figure 4 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 created and click Open.
Figure 5 Opening a connection
- Check whether the DB instance has been connected. If the connection information is correct, the DB instance has been connected.
Figure 6 Login succeeded
FAQs
What Should I Do If I Can't Connect to My TaurusDB Instance?
How Can I Log In to an Instance If I Forget the Account Name and Password?
On the Instances page of the console, locate the instance and choose More > Reset Password in the Operation column to reset the password. Then log in to the instance with the new password. For details, see Resetting the Administrator Password.