Updated on 2024-07-18 GMT+08:00

Changing a Database Port

Scenarios

This section describes how to change the database port of a primary DB instance or a read replica. For primary/standby DB instances, changing the database port of the primary DB instance will cause the database port of the standby DB instance to also be changed.

If specific security group rules have been configured for a DB instance, you need to change the inbound rules of the security group to which the DB instance belongs after changing the database port.

Constraints

When the database port of a DB instance is being changed, you cannot:

  • Bind an EIP to the DB instance.
  • Delete the DB instance.
  • Create a backup for the DB instance.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  3. On the Instances page, click the target DB instance or click first and then click the target read replica.
  4. In the Connection Information area on the Basic Information page, click Change next to the Database Port field.

    RDS for MariaDB instances can use database ports 1024 to 65535, excluding 12017 and 33071, which are reserved for RDS system use.

    • To submit the change, click .

  5. In the displayed dialog box, click Yes.

    • If you change the database port of the primary DB instance, that of the standby DB instance will also be changed and both DB instances will be rebooted.
    • If you change the database port of a read replica, the change will not affect other DB instances. Only the read replica will be rebooted.
    • This process takes 1 to 5 minutes.

  6. View the results on the Basic Information or Connectivity & Security page.