Common SQL Errors

MySQL Error 1804: ER_MTS_RESET_WORKERS - How to Fix and Prevent

Galaxy Team
August 7, 2025

<p>Error 1804 arises when MySQL cannot delete Multi Threaded Slave worker metadata tables during RESET SLAVE, blocking replication cleanup.</p>

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error code 1804 (ER_MTS_RESET_WORKERS)?

<p>MySQL Error 1804: ER_MTS_RESET_WORKERS means the server failed to remove worker info tables after RESET SLAVE, halting replication. Stop the replica, manually drop the leftover mysql.slave_worker_info tables, run RESET SLAVE ALL, then START SLAVE to resolve the issue.</p>

Error Highlights

Typical Error Message

Cannot clean up worker info tables. Additional error

Error Type

Replication Error

Language

MySQL

Symbol

ER_MTS_RESET_WORKERS

Error Code

1804

SQL State

HY000

Explanation

Table of Contents

What is MySQL Error 1804 (ER_MTS_RESET_WORKERS)?

MySQL raises Error 1804 with the message "Cannot clean up worker info tables" when it attempts to delete replication worker metadata during RESET SLAVE or channel reconfiguration. The failure involves tables in the mysql schema that store Multi Threaded Slave (MTS) status.

The error aborts RESET SLAVE and leaves replication inactive. Until the obstructing tables are removed, subsequent replication commands will fail or hang.

When does Error 1804 occur?

The condition appears on replicas configured with slave_parallel_workers after running RESET SLAVE, CHANGE MASTER TO, or during server start if old worker tables persist.

Unexpected crashes or forced shutdowns can also leave these tables open, causing the cleanup routine to fail at the next restart.

Why is it important to fix?

Replication stoppage leads to data lag and inconsistent reads. Rapid removal of the tables restores replication, maintains data parity, and protects downstream analytics.

What causes this error?

Locked files, corrupted tables, incorrect file permissions, or another session referencing mysql.slave_worker_info prevent MySQL from executing DROP TABLE during cleanup.

How to fix MySQL Error 1804

Stop replication, verify and drop the leftover worker tables, run RESET SLAVE ALL, and start replication again. A server restart may be required if file locks persist.

Common scenarios and solutions

Corrupted tables respond to mysqlcheck or a direct DROP TABLE followed by InnoDB file-per-table reclaim. Permission problems require adjusting ownership or file system mount options.

Best practices to avoid this error

Always stop replication cleanly before RESET SLAVE, enable crash-safe settings like sync_binlog and innodb_flush_log_at_trx_commit, and monitor the error log for worker cleanup warnings through Galaxy dashboards.

Related errors and solutions

Similar replication issues include Error 1201 (ER_MASTER_INF), Error 1872 (ER_SLAVE_CHANNEL_SINGLE), and Error 1268 (ER_TOO_BIG_ROWSIZE). Each involves metadata cleanup or privilege corrections.

Common Causes

Locked worker tables

A lingering thread still references the mts_worker_info tables, preventing DROP TABLE during RESET SLAVE.

File system permissions

The mysqld user lacks permission to delete the .frm or .ibd files in the data directory, blocking cleanup.

Corrupted metadata tables

Crash recovery or disk errors corrupt the worker info tables, causing internal engine failures when MySQL tries to drop them.

Related Errors

MySQL Error 1201: ER_MASTER_INF

Occurs when the replica cannot update master info; often fixed by repairing mysql.slave_master_info.

MySQL Error 1872: ER_SLAVE_CHANNEL_SINGLE

Raised when a command requires a single channel but multiple channels exist; specify FOR CHANNEL to resolve.

MySQL Error 1268: ER_TOO_BIG_ROWSIZE

Signals a row exceeds InnoDB page limits; solved by reducing columns or changing row format.

FAQs

How do I resolve MySQL Error 1804 quickly?

Stop replication, drop the residual mysql.slave_worker_info tables, run RESET SLAVE ALL, and then START SLAVE.

Can I fix Error 1804 without restarting MySQL?

Yes, in most cases dropping the tables and running RESET SLAVE ALL is enough. Restart only if file locks persist.

Will dropping worker info tables lose data?

No. These tables store replication state, not user data. Once replication restarts, state is rebuilt automatically.

How does Galaxy help prevent this error?

Galaxy lets teams version and endorse replication maintenance scripts, ensuring the correct cleanup commands are always reused.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo