Error: Bogus Data in Log Event
Issue
Syncs fail. The following error appears:
Bogus data in log event
Environment
Connector: MySQL
Resolution
To resolve this issue, do the following:
- In your database, ensure automatic binary log file removal is disabled or the retention period is set to at least seven days.
- Run the following query:
SHOW VARIABLES LIKE 'expire_logs_days';
- If the returned value is
0
, automatic binary log file removal is disabled and you don't need to take any action. If the value is greater than0
, but less than7
, run the following command:SET GLOBAL expire_logs_days = 7;
- Run the following query:
- In Fivetran, go to your MySQL connector page.
- Select the Setup tab.
- Click Resync all historical data.
- In the confirmation pop-up window, click Re-sync Connector.
Cause
This issue occurs when a binary log file becomes corrupted. This may happen due to any of the following reasons:
- You have enabled automatic binary log file removal in your database, and the retention period is set to less than the recommended seven days.
- You have run commands that may have intentionally deleted binary log files, such as
PURGE BINARY LOGS
orRESET MASTER
. - Recent significant database changes or server crashes have impacted the binary log file or its position.