Common SQL Errors

MySQL Error 1784: ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF - Causes, Fixes, and Prevention

Galaxy Team
August 7, 2025

<p>The server is in GTID_MODE=OFF but tries to read a binary log that contains GTID events, causing replication or startup failure.</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 1784 (ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF)?

<p>MySQL Error 1784: ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF appears when a server with GTID_MODE set to OFF reads a binary log that contains GTID events. Turn GTID_MODE ON (or ON_PERMISSIVE) or purge the offending binary logs to clear the error.</p>

Error Highlights

Typical Error Message

Found a Gtid_log_event or Previous_gtids_log_event when

Error Type

Replication / Configuration Error

Language

MySQL

Symbol

ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF

Error Code

1784

SQL State

HY000

Explanation

Table of Contents

What is MySQL Error 1784 (ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF)?

The error fires when a MySQL instance running with @@GLOBAL.GTID_MODE=OFF encounters a Gtid_log_event or Previous_gtids_log_event in a binary or relay log. Because GTID events require GTID_MODE set to ON or a permissive state, the server halts replication or startup to avoid data corruption.

Versions before 5.7.5 raised Error 1784 directly, while newer releases reject the log with a generic message. Understanding why the mismatch occurs lets you repair replication quickly and safely.

What Causes This Error?

Most cases involve copying or replicating binary logs from a GTID-enabled source into a GTID-disabled replica. Disabling GTID_MODE locally without purging existing logs can also leave GTID events in place, triggering the error on restart.

Upgrades, downgrades, or restoring backups created on servers with different GTID settings frequently introduce the mismatch.

How to Fix MySQL Error 1784

The fastest remedy is to enable GTID_MODE so the server accepts the GTID events. Switch through the safe state sequence OFF - OFF_PERMISSIVE - ON_PERMISSIVE - ON, then restart replication.

If you cannot use GTIDs, purge or rotate the problematic binary logs, create a new replication snapshot, and restart replication with MASTER_AUTO_POSITION disabled.

Common Scenarios and Solutions

During replica rebuilds, loading an old dump that still references GTID events causes Error 1784. Enable GTID_MODE temporarily, restore, then disable if required.

When cloning production data for staging, ensure both environments share the same gtid_mode value before transporting binlogs.

Best Practices to Avoid This Error

Standardize GTID settings across all servers in a topology. Automate variable checks during deployment to flag inconsistencies early.

Regularly expire or purge binary logs so that disabling GTID_MODE never leaves stray GTID events behind.

Related Errors and Solutions

Error 1843 (ER_GTID_EXECUTED_WO_GTID_MODE) appears when @@GLOBAL.GTID_EXECUTED is non-empty while GTID_MODE is OFF. Fix it by clearing gtid_executed or re-enabling GTIDs.

Error 1839 (ER_GTID_NEXT_LIST_NOT_NEEDED) surfaces when GTID_NEXT is set incorrectly. Reset the session variable or use SET GTID_NEXT='AUTOMATIC'.

Common Causes

Importing GTID Logs into a Non-GTID Server

Binary logs copied from a master running GTID_MODE=ON land on a replica where GTID_MODE=OFF, leading to Error 1784 during replication start.

Disabling GTID Without Purging Logs

Administrators turn GTID_MODE OFF for maintenance but forget to rotate or purge logs that already hold GTID events.

Mismatched Backup and Restore

A physical backup taken from a GTID-enabled server is restored onto an instance with GTID disabled, triggering the error during crash recovery.

Related Errors

MySQL Error 1843: ER_GTID_EXECUTED_WO_GTID_MODE

Raised when gtid_executed is populated but GTID_MODE is OFF. Clear the variable or enable GTID_MODE.

MySQL Error 1839: ER_GTID_NEXT_LIST_DOUBLE_UNREGISTER

Occurs when GTID_NEXT list has duplicate entries. Use SET GTID_NEXT='AUTOMATIC'.

MySQL Error 1236: Could not find first log file name

Appears when replication references purged logs. Re-sync replication or adjust log file positions.

FAQs

Can I ignore Error 1784 if replication seems to work?

No. The mismatch indicates potential data drift. Resolve it before relying on replication integrity.

Is Error 1784 removed in modern MySQL versions?

The explicit error code was retired after 5.7.5, but the server still stops with a similar message when GTID events are read in GTID_MODE=OFF.

Will enabling GTID_MODE harm existing data?

Switching through OFF_PERMISSIVE and ON_PERMISSIVE preserves consistency. Always back up first, then enable GTIDs.

How does Galaxy help avoid this error?

Galaxy's SQL editor surfaces gtid_mode and other variables inline, letting you validate settings before moving binlogs or cloning data, preventing Error 1784.

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