The warning appears when a session or global sql_mode is unset, a practice deprecated since MySQL 5.7.7.
ER_WARN_DEPRECATED_SQLMODE_UNSET signals that removing a value from sql_mode is deprecated in MySQL 5.7.7 and later. Leave the mode enabled or explicitly set the desired modes instead of unsetting them to eliminate the warning.
ER_WARN_DEPRECATED_SQLMODE_UNSET
Error 3129 is a deprecation warning raised when an application or user tries to unset a sql_mode value in MySQL 5.7.7 or later. The server flags this because sql_mode will become read-only in future versions.
The warning does not stop query execution, but it indicates that current behaviour will break once sql_mode becomes immutable. Addressing it early avoids production issues during upgrades.
MySQL raises the warning whenever SET GLOBAL sql_mode='' or SET SESSION sql_mode='' removes one or more existing modes. The parser detects the empty or reduced list and returns 3129.
Configuration files that override sql_mode by comment-ing out values also trigger it at server startup.
Stop unsetting sql_mode. Instead, define the exact combination of modes you need. If you truly want the default, query @@sql_mode on a clean instance and copy that list explicitly.
Updating application code and server configuration files ensures clean logs and future-proof behaviour.
Legacy applications that cleared ONLY_FULL_GROUP_BY previously use SET sql_mode=''. Replace that line with SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')) to keep other modes intact.
Docker images with outdated my.cnf examples often unset STRICT_ALL_TABLES. Update the config to list desired modes instead.
Pin sql_mode in a single place, preferably the global my.cnf, and avoid changing it dynamically. Document required modes in version control.
Before upgrades, test code against the newer default sql_mode to catch query issues early.
Warning 3135 (ONLY_FULL_GROUP_BY incompatible) indicates queries that fail once ONLY_FULL_GROUP_BY is active. Fix by rewriting GROUP BY clauses.
Error 1235 (ER_OPTION_PREVENTS_STATEMENT) appears when a statement is blocked by sql_mode settings. Adjust the query or mode accordingly.
Scripts execute SET SESSION sql_mode='' to bypass strict modes, immediately triggering the warning.
DBAs comment out sql_mode entries in my.cnf, causing MySQL to interpret an empty value and raise 3129 at startup.
Older ORMs automatically clear ONLY_FULL_GROUP_BY for compatibility, now considered deprecated behaviour.
Raised when queries use non-aggregated columns without GROUP BY and ONLY_FULL_GROUP_BY is active.
Occurs when a statement is blocked because of sql_mode restrictions such as SAFE_UPDATES.
Signals deprecated features similar to how 3129 flags deprecated sql_mode handling.
No. It is a warning, so the query still runs, but it signals future incompatibility.
You can, but logs will be noisy and upgrades may fail when sql_mode becomes read-only.
It appears in MySQL 5.7.7 and remains in 8.x whenever sql_mode is unset.
Galaxy’s editor flags deprecated SQL patterns in real time. Team-reviewed snippets ensure sql_mode is set consistently across scripts.