Error
Error Code:
3991
MySQL Error 3991: Replication Failover Requires Auto-Position
Description
This error occurs when you attempt to enable the `SOURCE_CONNECTION_AUTO_FAILOVER` feature for asynchronous replication without first enabling the `SOURCE_AUTO_POSITION` option. MySQL requires `SOURCE_AUTO_POSITION` to be active for the connection failover mechanism to function correctly.
Error Message
Failed to enable Asynchronous Replication Connection Failover feature. The CHANGE REPLICATION SOURCE TO SOURCE_CONNECTION_AUTO_FAILOVER = 1 can only be set when SOURCE_AUTO_POSITION option of CHANGE REPLICATION SOURCE TO is enabled.
Known Causes
3 known causesMissing SOURCE_AUTO_POSITION
You attempted to enable `SOURCE_CONNECTION_AUTO_FAILOVER` in your `CHANGE REPLICATION SOURCE TO` statement without also setting `SOURCE_AUTO_POSITION = 1`.
Incorrect Replication Configuration
The replication setup is misconfigured, specifically regarding the prerequisites for advanced features like asynchronous connection failover.
Feature Dependency Oversight
The command was executed without awareness that `SOURCE_CONNECTION_AUTO_FAILOVER` has a strict dependency on `SOURCE_AUTO_POSITION` being active.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service