This topic describes how to perform a manual or automatic switchover of services between a primary ApsaraDB RDS for MySQL instance and its secondary instance. After the switchover, the primary instance becomes the secondary instance.
Prerequisites
The RDS instance runs the High-availability Edition.
Background information
- Automatic switchover: the default switchover mode. If the primary instance becomes faulty, your services are automatically switched over to the secondary instance.
- Manual switchover: allows you to manually switch over services between the primary and secondary instances. You can do so even if the automatic switchover function is enabled.
For more information about how to perform the switchover in other database engines, see the following topics:
- Perform a manual or automatic switchover of services between a primary ApsaraDB RDS for SQL Server instance and its secondary instance
- Perform a manual or automatic switchover of services between a primary ApsaraDB RDS for PostgreSQL instance and its secondary instance
- Perform a manual or automatic switchover of services between a primary ApsaraDB RDS for PPAS instance and its secondary instance
- Perform a manual or automatic switchover of services between a primary ApsaraDB RDS for MariaDB instance and its secondary instance
Precautions
- During a switchover, a brief disconnection may occur. Make sure that your application is configured to automatically reconnect to the instance.
- If the primary instance has read-only instances, data replication on the read-only instances shows a latency of a few minutes after a switchover. This is because it takes time to re-establish replication links and synchronize incremental data.
Perform a manual switchover of services between a primary RDS instance and its secondary instance
Temporarily disable automatic switchover
The automatic switchover function is enabled by default. In this situation, services are automatically switched over to the secondary instance if the primary instance becomes faulty. You can disable the automatic switchover function in the following situations:
- A sales promotion, during which you do not want a switchover to affect service availability.
- An important application upgrade, during which you do not want a switchover to incur any unexpected issues.
- A major event that requires stable system operation, during which you do not want a switchover to affect system stability.
After the setting is complete, you can go to the Service Availability page to check the deadline before which the automatic switchover function is disabled.

FAQ
Can I access a secondary instance?
No, you cannot access a secondary instance. You can access only a primary instance. A secondary instance serves only as a backup instance and does not allow external access.
Related operations
Operation | Description |
---|---|
Switch over services between primary RDS instance and its secondary instance | Switches over services between a primary RDS instance and its secondary instance. |
Enable or disable automatic primary/secondary switchover | Enables or disables the automatic switchover function for an RDS instance. |
Query settings of automatic primary/secondary switchover | Queries the status of the automatic switchover function for an RDS instance. |