MySQL Asynchronous Connection Failover Prerequisites

Setting up asynchronous connection failover in MySQL ensures high availability by automatically switching replica connections to a new source if the primary source fails. This article outlines the essential system requirements, configuration settings, and user privileges needed to successfully implement this failover mechanism in your MySQL replication environment.

MySQL Version Requirements

Replication and GTID Configuration

Performance Schema Requirements

The failover mechanism relies on the MySQL Performance Schema to monitor connection states and manage the list of potential source servers. * Performance Schema Enabled: Ensure that the Performance Schema is enabled on the replica: ini performance_schema = ON

Administrative Privileges

To configure and manage the source sender list for failover, the database user requires specific privileges: * Replica Administration: The user executing the configuration functions must have the SUPER privilege, or the REPLICATION_SLAVE_ADMIN privilege (available in MySQL 8.0 and above). * UDF Execution: Privileges to execute User-Defined Functions (UDFs) such as asynchronous_connection_failover_add_source and asynchronous_connection_failover_delete_source.

Network and Security Settings