1698
MySQLERRORCommonReplicationMEDIUM confidence
Generic error reported on the replication source
Production Risk
High — replication stopped; replica data may be stale.
What this means
A generic error occurred on the replication source. The error message typically includes the underlying cause. This code wraps source-side errors reported to the replica.
Why it happens
- 1Source executed a statement that failed.
- 2Networking issue interrupted the replication stream.
- 3Source binlog event is malformed.
How to reproduce
trigger — this will error
trigger — this will error
-- Observed in SHOW SLAVE STATUS\G as Last_Error.
expected output
ERROR 1698 (HY000): Error on master: code: 1062 message: Duplicate entry '1' for key 'PRIMARY'
Fix
Identify and resolve the underlying source error
Identify and resolve the underlying source error
SHOW SLAVE STATUS\G -- Review Last_SQL_Error and Last_Error_Code fields. -- Fix the data inconsistency on the source or use sql_slave_skip_counter if safe.
Why this works
The embedded error code and message indicate the exact failure on the source.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 1698 ER_ERROR_ON_MASTER
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev