Error
Error Code:
1673
MySQL Error 1673: Replication Unsafe System Variable
Description
This error indicates that a SQL statement executed on the primary server is considered unsafe for statement-based replication. It typically occurs when the statement uses a system variable whose value might differ between the primary and replica, potentially leading to data inconsistency or divergent data sets.
Error Message
Statement is unsafe because it uses a system variable that may have a different value on the replica.
Known Causes
3 known causesSession-Specific Variable Values
The statement relies on a system variable whose value is set at the session level on the primary, which may not be consistently applied or identical in the replica's replication thread context.
Non-Replicable System Variables
The SQL statement uses a system variable that is inherently difficult to replicate reliably across servers, such as those tied to specific host contexts, timestamps, or connection details.
Statement-Based Replication Usage
This error is a common characteristic of deployments utilizing statement-based replication, which is highly sensitive to varying system variable values and non-deterministic operations across servers.
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