You can connect to a DB instance through a non-SSL connection or an SSL connection. The SSL connection encrypts data and is more secure.
For details about how to bind an EIP, see section Binding an EIP.
Add the IP address obtained in 1.b and the instance port to the inbound rule of the security group.
For details about how to configure a security group rule, see section Configuring Security Group Rules.
You can use a database client to connect to the target DB instance in the Linux or Windows operating system (OS).
For details about how to obtain and install the MySQL client, see section How Can I Install the MySQL Client?
The database client MySQL-Front is used as an example in Using MySQL-Front to Connect to a DB Instance.
Parameter |
Description |
---|---|
Name |
Indicates the name of the database connection task. If you do not set this parameter, it will be the same as the Host value by default. |
Host |
Indicates the EIP of the DB instance to be connected. |
Port |
Indicates the private network port of the DB instance. |
User |
Indicates the name of the user who will access the DB instance. The default user is root. |
Password |
Indicates the password of the RDS database account. |
If the connection fails, ensure that preparations have been correctly made in Prerequisites and try again.
For details, see section How Can I Identify the Validity Period of an SSL Root Certificate?
Parameter |
Description |
---|---|
<host> |
Indicates the EIP of the DB instance to be connected. |
<port> |
Indicates the port of the DB instance to be connected. |
<userName> |
Indicates the username of the RDS database account. The default administrator is root. |
<caDIR> |
Indicates the directory of the CA certificate. The certificate should be stored in the directory where the command is executed. |
For example, to connect to a DB instance through an SSL connection as user root, run the following command:
mysql -h 172.16.0.31 -P 3306 -u root -p --ssl-ca=ca.pem
Enter the password of the database account if the following information is displayed:
Enter password:
If the connection fails, ensure that preparations have been correctly made in Prerequisites and try again.