1738
MariaDBWARNINGCriticalReplicationHIGH confidence
binlog_cache_size is greater than max_binlog_cache_size
Production Risk
Low — warning only; MySQL auto-adjusts the value.
What this means
The configured binlog_cache_size exceeds max_binlog_cache_size, which is an inconsistent configuration that MySQL will warn about at startup.
Why it happens
- 1binlog_cache_size was set to a value larger than max_binlog_cache_size in my.cnf.
How to reproduce
trigger — this will error
trigger — this will error
SET GLOBAL binlog_cache_size = 1073741824; SET GLOBAL max_binlog_cache_size = 536870912;
expected output
Warning (Code 1738): binlog_cache_size (1073741824) is greater than max_binlog_cache_size (536870912); setting binlog_cache_size equal to max_binlog_cache_size.
Fix
Set binlog_cache_size to be at most max_binlog_cache_size
Set binlog_cache_size to be at most max_binlog_cache_size
SET GLOBAL binlog_cache_size = 536870912; -- Or increase max_binlog_cache_size: SET GLOBAL max_binlog_cache_size = 1073741824;
Why this works
MySQL will silently cap binlog_cache_size at max_binlog_cache_size; making the config explicit avoids the warning.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 1738 ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev