Common SQL Errors

MySQL Error 3099 ER_PREVENTS_VARIABLE_WITHOUT_RBR: Cannot change variable without binary log - Fix Guide

Galaxy Team
August 8, 2025

MySQL raises ER_PREVENTS_VARIABLE_WITHOUT_RBR (SQLSTATE HY000, error 3099) when you try to set transaction_write_set_extraction or other row-based settings while binary logging is disabled or binlog_format is not ROW.

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 3099 ER_PREVENTS_VARIABLE_WITHOUT_RBR?

ER_PREVENTS_VARIABLE_WITHOUT_RBR occurs in MySQL when you change transaction_write_set_extraction or similar variables while binary logging is off or binlog_format is STATEMENT/MIXED. Enable the binary log and set binlog_format='ROW', or disable the write-set variable, to clear the error.

Error Highlights

Typical Error Message

ER_PREVENTS_VARIABLE_WITHOUT_RBR

Error Type

Configuration Error

Language

MySQL

Symbol

format as ROW. From 5.7.6: transaction_write_set_extraction option value is set and binlog_format is not ROW. ER_PREVENTS_VARIABLE_WITHOUT_RBR was added in 5.7.6.

Error Code

3099

SQL State

HY000

Explanation

Table of Contents

What does MySQL error 3099 ER_PREVENTS_VARIABLE_WITHOUT_RBR mean?

MySQL throws ER_PREVENTS_VARIABLE_WITHOUT_RBR when you try to enable features that depend on row-based binary logging while the server is not running with binlog_format=ROW. The most common trigger is setting transaction_write_set_extraction to a non-OFF value.

The server refuses the change to prevent replication inconsistencies. Row-based events are required so write sets can be extracted and conflict detection remains reliable in Group Replication and GTID setups.

What causes this error?

The error appears if you run SET GLOBAL or SET PERSIST for transaction_write_set_extraction, binlog_transaction_dependency_tracking, or similar variables when binary logging is disabled with --skip-log-bin or when binlog_format is MIXED or STATEMENT.

It also surfaces during server startup if configuration files request those variables without the proper binary log settings. Any attempt inside a restricted session, such as stored procedures, will fail the same way.

How to fix ER_PREVENTS_VARIABLE_WITHOUT_RBR

Fix the error by turning on the binary log and switching to row-based logging, then reissue the variable change. Alternatively, keep the binary log off but leave transaction_write_set_extraction=OFF.

If binary logging must stay disabled in production, add or modify the configuration so the conflicting variable is not set. This lets the server start without errors.

Common scenarios and solutions

On replicas running Group Replication, DBAs often enable transaction_write_set_extraction on existing servers that still use STATEMENT logging. Switching binlog_format to ROW first resolves the conflict.

Cloud services that default to MIXED logging throw the error when an application issues SET SESSION transaction_write_set_extraction=XXHASH64. Adjust instance parameters or ask support to enable row-based replication.

Best practices to avoid this error

Standardize on binlog_format=ROW across all MySQL 5.7.6+ servers that plan to use Group Replication, write-set extraction, or similar features. Document the dependency in your configuration management.

Use a modern SQL editor like Galaxy to store vetted startup scripts. Galaxy highlights server variables and can lint your scripts to ensure binlog_format is set correctly before deployment.

Related errors and solutions

ER_BINLOG_UNSAFE_STATEMENT warns about unsafe statement logging and often precedes ER_PREVENTS_VARIABLE_WITHOUT_RBR. Switching to ROW format fixes both.

ER_CANT_SET_GTID_PURGED appears when GTID_PURGED is set without enabling GTID mode. As with the RBR error, ensure prerequisite settings are configured first.

Common Causes

transaction_write_set_extraction enabled while binlog_format!=ROW

When transaction_write_set_extraction=XXHASH64 or MURMUR32 is requested, MySQL demands row-based events. If binlog_format is STATEMENT or MIXED the server blocks the change.

Binary logging disabled via --skip-log-bin

Disabling the binary log removes the row-event stream entirely. Any variable that needs the stream will trigger ER_PREVENTS_VARIABLE_WITHOUT_RBR.

Conflicting my.cnf settings on startup

Placing transaction_write_set_extraction=XXHASH64 in my.cnf without matching binlog_format=ROW makes the instance fail to start, surfacing the error in the error log.

Dynamic change inside sessions

Applications or maintenance scripts that issue SET GLOBAL transaction_write_set_extraction during runtime cause the error if the server is still in STATEMENT logging mode.

Related Errors

ER_BINLOG_UNSAFE_STATEMENT (Code 1592)

Warns that the current statement cannot be safely replicated under STATEMENT logging. Switching to ROW often eliminates the warning.

ER_CANT_SET_GTID_PURGED (Code 1840)

Occurs when GTID_PURGED is set while GTID mode is OFF. Sequence of configuration changes matters as with ER_PREVENTS_VARIABLE_WITHOUT_RBR.

ER_BINLOG_DISABLED (Code 1381)

Raised when an operation requires the binary log but log_bin is disabled. Enabling the binlog resolves it.

FAQs

Can I enable transaction_write_set_extraction without enabling the binary log?

No. The variable relies on row events in the binary log. MySQL blocks the change if binary logging is disabled.

Is MIXED logging sufficient to use write set extraction?

No. MIXED still allows statement events. You must set binlog_format=ROW for complete compatibility.

Does this error affect replicas as well as primaries?

Yes. Any MySQL instance that changes the variable without row logging will raise the error, regardless of its replication role.

How can Galaxy help me avoid this configuration error?

Galaxy flags mismatched server variables in connection scripts and lets you share vetted my.cnf snippets, ensuring consistent row-based logging across environments.

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