1271
MySQLerrorconfigurationhigh confidence
Unknown system variable
Production Risk
Low — the statement fails; no data is changed.
What this means
A SET or SELECT statement referenced a system variable name that MySQL does not recognise.
Why it happens
- 1Typo in variable name
- 2Variable was removed or renamed in a newer/older MySQL version
- 3Plugin providing the variable is not loaded
How to reproduce
trigger — this will error
trigger — this will error
SET GLOBAL nonexistent_var = 1;
expected output
ERROR 1271 (HY000): Unknown system variable 'nonexistent_var'
Fix 1
Check variable name
Check variable name
SHOW VARIABLES LIKE '%keyword%';
Why this works
Lists variables matching a pattern so you can find the correct name.
Fix 2
Verify plugin is loaded
Verify plugin is loaded
SHOW PLUGINS;
Why this works
Plugin variables are only visible when the plugin is active.
What not to do
✕
Version notes
Sources
Official documentation ↗
MySQL 8.0 — 1271 ER_UNKNOWN_SYSTEM_VARIABLE
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev