Replication halts because the master server returned an error while writing the original statement to its binary log, leaving master and slave out of sync.
MySQL error 3001 ER_ERROR_ON_MASTER occurs when the master fails mid-statement, so the replica stops to prevent data divergence. Check the master for the root cause, manually run the interrupted query, then resume replication with SQL_SLAVE_SKIP_COUNTER=1 and START SLAVE to fix it.
ER_ERROR_ON_MASTER
Error 3001 signals that the master server encountered a runtime problem while executing and logging a statement. Because the event may not be fully written to the binary log, the slave pauses to avoid drifting from the master.
The replication SQL thread stops with SQL state HY000, leaving Seconds_Behind_Master null. Until you resolve the root problem and reconcile data, replication will not advance.
The master might crash or kill the statement after changing some rows but before flushing the event to the binary log. That partial state breaks the guarantee of deterministic replay on replicas.
Other common triggers include unsafe non-transactional tables, disk exhaustion while writing the binlog, or a plugin raising a fatal error during statement execution.
First inspect the master: review mysqld.log, dmesg, and SHOW SLAVE STATUS on the replica to capture the failing query text and master_log_file / master_log_pos.
If the master data is trusted, run the captured query manually on the slave to bring it to the same state, then advance the relay log pointer with SQL_SLAVE_SKIP_COUNTER=1 and start replication.
When a DML statement against a MyISAM table dies mid-way, wrap it in a transaction or migrate the table to InnoDB to prevent future issues.
If disk ran out of space, free capacity on the master, flush logs, and ensure expire_logs_days or binlog_expire_logs_seconds is tuned.
Use the InnoDB engine and ROW-based binlog_format to guarantee atomic logging. Monitor master error logs and alert on any ER_ERROR_ON_MASTER occurrence.
Galaxy’s versioned SQL editor helps teams review and approve write statements before deployment, lowering the risk of unsafe queries reaching production.
Error 1032 (ER_KEY_NOT_FOUND) surfaces when a replica cannot locate a row needed by an UPDATE or DELETE. The fix is similar: reconcile data, then skip or retry the event.
Error 1792 (ER_BINLOG_UNSAFE_STATEMENT) warns that a statement may cause divergent replicas. Convert the table to InnoDB or switch to row-based logging to eliminate it.
The server process may exit unexpectedly or be killed, interrupting binlog write.
MyISAM or MEMORY tables cannot roll back partial changes, leaving inconsistent state.
Binary logging halts when no space remains, causing the write to fail.
UDFs, triggers, or plugins can abort the statement after data modification but before binlog commit.
Replica cannot find a row referenced by the event. Often fixed by skipping or inserting the missing row.
Statement deemed unsafe for statement-based logging. Switch to row-based or rewrite the query.
Replication thread encountered a fatal problem; may include ER_ERROR_ON_MASTER as the underlying cause.
Only if you are certain the master and slave datasets are logically identical. Otherwise, reconcile data first.
Row format reduces risk but the master can still crash mid-transaction. Use transactions and monitoring.
Galaxy enables peer review of mutation queries and keeps a history, helping teams catch risky statements before they hit production.
Usually not. You can apply the missing query and resume replication without stopping the master.