3297
MySQLERRORNotableSystem VariablesHIGH confidence

Variable is global only and cannot be set at session level

Production Risk

Low — command is rejected; no configuration change occurs.

How to reproduce
trigger — this will error
trigger — this will error
SET SESSION innodb_buffer_pool_size = 134217728;

expected output

ERROR 3297 (HY000): Variable 'innodb_buffer_pool_size' is a GLOBAL variable and should be set with SET GLOBAL.

Fix

Use SET GLOBAL

Use SET GLOBAL
SET GLOBAL innodb_buffer_pool_size = 134217728;

Why this works

GLOBAL scope is required for server-wide configuration variables.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3297 ER_GLOBAL_VARIABLE2

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors