If your application is deployed on the ECS instance that is located in the same region and has the same network type as your RDS instance, you do not need an Internet IP address. If your application is deployed on the ECS that is located in the different region or has the different network type from your RDS instance, or is deployed on a platform other than Alibaba Cloud, an Internet address is necessary for access to the RDS instance.

Note
When the instances are in the same region (the zones can be different), they can access each other through the intranet.

Background information

RDS supports connections through the intranet and Internet. The access mode and instance type of the instance determine available connection types.

Instance series Instance version Access mode Connection address
Basic Edition
  • MySQL 5.7
  • SQL Server 2012
Standard mode
  • Intranet IP address
  • Internet IP address
  • Intranet and Internet IP addresses
High-availability Edition
  • MySQL 5.5/5.6
  • SQL Server 2008 R2
  • PostgreSQL 9.4
  • PPAS 9.3
Standard mode
  • Intranet IP address
  • Internet IP address
Safe connection mode
  • Intranet IP address
  • Internet IP address
  • Intranet and Internet IP addresses
Finance Edition MySQL 5.6 Standard mode
  • Intranet IP address
  • Internet IP address
Safe connection mode
  • Intranet IP address
  • Internet IP address
  • Intranet and Internet IP addresses

The applicable scenarios of the connection addresses are as follows:

  • Use the intranet IP address only:
    • The system provides an intranet address by default, and you can directly modify the connection address.
    • This scenario is applicable when your application is deployed on the ECS instance that is located in the same region and has the same network type as your RDS instance.
  • Use the Internet IP address only:
    • This scenario is applicable when your application is deployed on the ECS instance that is located in the different region from that of your RDS instance.
    • This scenario is applicable when your application is deployed on a platform other than Alibaba Cloud.
  • Use both intranet and Internet IP addresses:
    • This scenario is applicable when your application is deployed on the ECS instance that is located in the same region and has the same network type as your RDS instance, and application modules are deployed in an ECS where your RDS instance is not located.
    • This scenario is applicable when your application is deployed on the ECS instance that is located in the same region and has the same network type as your RDS instance, and on a platform other than Alibaba Cloud.

Attentions

  • Before accessing an RDS instance, add IP addresses or IP address segments to the whitelist. Otherwise, they cannot access the RDS instance. For more information, see Set whitelist.
  • Traffic fees are charged for connections through Internet. For more information about pricing and fees charging, see RDS Pricing.
  • Connecting the RDS instance through an Internet IP address may reduce the instance security. Proceed with caution. To get a higher transmission rate and a higher security level, we recommend that you migrate your applications to an ECS instance that is in the same region as your RDS.

Procedure

  1. Log on to the RDS console.
  2. Select the region where the target instance is located.
  3. Click the ID of the target instance to visit to the Basic Information page.
  4. Select Database Connection in the left-side navigation pane to visit the Database Connection page.
  5. Click Apply for Internet Address, as shown in the following picture.


  6. On the displayed confirmation window, click OK to generate an Internet IP address.
  7. Click Modify Connection Address and modify the connection address and port of the Internet or intranet, as shown in the following picture.


    Parameter description:

    • Connection Type: Select Intranet Address or Internet Address according to the connection type to be modified.
    • Connection Address: The address format is xxx.mysql.rds.aliyuncs.com and xxx is a user-defined field. The address contains 8 to 64 characters including letters and digits. It must begin with a lowercase letter.
    • Port: indicates the number of the port through which RDS provides external services, which can be an integer within the range [3200, 3999].
  8. Click OK.