Error
Error Code:
1839
MariaDB Error 1839: GTID_PURGED Requires GTID_MODE ON
Description
This error indicates an attempt to modify the `@@GLOBAL.GTID_PURGED` system variable. `GTID_PURGED` tracks the GTIDs of transactions that have been purged from binary logs and can only be set when Global Transaction Identifiers (GTID) are fully enabled, meaning `@@GLOBAL.GTID_MODE` is set to `ON`. This typically happens when a user or application tries to update `GTID_PURGED` without first ensuring GTID replication is active.
Error Message
@@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON.
Known Causes
3 known causesGTID_MODE Not Enabled
The `@@GLOBAL.GTID_MODE` system variable is not currently set to `ON`, which is a strict prerequisite for modifying `GTID_PURGED`.
Incorrect Replication State
The server might be in an interim or specific replication state (e.g., `OFF_PERMISSIVE`, `ON_PERMISSIVE`, `ON_SLAVE`) where `GTID_PURGED` cannot be directly set.
Application Logic Error
An application, script, or automated process attempted to set `GTID_PURGED` without first verifying or setting `GTID_MODE` to `ON`.
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