SQL Statements for Controlling Replica Servers 2. When you set 3. When you set SOURCE_CONNECTION_AUTO_FAILOVER = 1 , set  MASTER_RETRY_COUNT  and MASTER_CONNECT_RETRY  to minimal numbers that just allow a few retry attempts with the same source in a short time, in case the connection failure is caused by a transient network outage. Otherwise the asynchronous connection failover mechanism cannot be activated promptly. Suitable values are  MASTER_RETRY_COUNT=3  and MASTER_CONNECT_RETRY=10 , which make the replica retry the connection 3 times with 10-second intervals between. SOURCE_CONNECTION_AUTO_FAILOVER = 1 , the replication metadata repositories must contain the credentials for a replication user account that can be used to connect to all the servers on the source list for the replication channel. These credentials can be set using the  CHANGE REPLICATION SOURCE TO statement with the  MASTER_USER  and MASTER_PASSWORD  options. For more information, see Section 17.4.9, “Switching Sources with Asynchronous Connection Failover” . The following table shows the maximum permissible length for the string-valued options. Option Maximum Length MASTER_HOST 255 (60 prior to MySQL 8.0.17) MASTER_USER 96 MASTER_PASSWORD 32 MASTER_LOG_FILE 511 RELAY_LOG_FILE 511 MASTER_SSL_CA 511 MASTER_SSL_CAPATH 511 MASTER_SSL_CERT 511 MASTER_SSL_CRL 511 MASTER_SSL_CRLPATH 511 MASTER_SSL_KEY 511 MASTER_SSL_CIPHER 511 MASTER_TLS_VERSION 511 MASTER_TLS_CIPHERSUITES 4000 MASTER_PUBLIC_KEY_PATH 511 2756