Help Center> Relational Database Service> User Guide> Working with RDS for MySQL> Instance Modifications> Changing a DB Instance Type from Single to Primary/Standby
Updated on 2023-11-27 GMT+08:00

Changing a DB Instance Type from Single to Primary/Standby

Scenarios

  • RDS enables you to change single DB instances to primary/standby DB instances to improve instance reliability.
  • Primary/standby DB instances support automatic failover. If the primary DB instance fails, the standby DB instance takes over services quickly. You are advised to deploy primary and standby DB instances in different AZs for high availability and disaster recovery.
  • The time required for changing an instance type from single to primary/standby depends on the amount of data to be backed up. Changing a single instance to a primary/standby instance does not affect workloads on the instance.

Precautions

RDS single DB instances can be changed to primary/standby DB instances, but not the other way around. You can use Data Replication Service (DRS) or the export and import tool of the client to migrate data from primary/standby DB instances to single DB instances.

Billing

Table 1 Billing

Billing Mode

Operation

Impact on Fees

Yearly/Monthly

Changing a single DB instance to primary/standby

You need to pay for the difference in price based on the remaining period.

The following prices are for reference only. The actual prices are subject to the price displayed on the console.

Suppose you purchased a one-month RDS for MySQL 5.7 single DB instance (instance class: general-purpose, 2 vCPUs | 8 GB; storage: cloud SSD, 40 GB) in CN-Hong Kong on June 1, 2023. The instance price was $59.56 USD per month.

On June 15, 2023, you changed the instance type from single to primary/standby. The instance price became $155.69 USD per month.

Price difference = Price for the primary/standby instance × Remaining period - Price for the single instance × Remaining period

The remaining period is the remaining days of each calendar month divided by the maximum number of days in each calendar month.

In this example, the remaining period and price difference are calculated as fellows:

Remaining period = 15 (Remaining days in June)/30 (Maximum number of days in June) = 0.5

Price difference = $155.69 USD x 0.5 - $59.56 USD x 0.5 = $48.06 USD

Pay-per-use

Changing a single DB instance to primary/standby

The primary/standby DB instance is billed by hour. For details, see Product Pricing Details.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, locate a single DB instance and choose More > Change Type to Primary/Standby in the Operation column.

    Alternatively, click the target DB instance. In the DB instance topology, click on the left to change the instance type from single to primary/standby.

  5. Select a standby AZ. Other configurations are the same as those of the primary DB instance by default. Confirm the configurations and click Submit.

    For yearly/monthly DB instances, click Pay Now.

  6. Check the instance status on the Instances page.

    • The DB instance is in the Changing type to primary/standby status. You can view the task progress (not the time progress) on the Task Center page. For details, see Task Center.
    • In the upper right corner of the DB instance list, click to refresh the list. After the DB instance type is changed to primary/standby, the instance status will change to Available and the instance type will change to Primary/Standby.