1979
MariaDBERRORCommonConfigurationHIGH confidence
Variable can only be set, not read
Production Risk
None — read is rejected; no data is exposed.
What this means
An attempt was made to read (SELECT @@variable) a system variable that is write-only. Some variables can be set but their value cannot be retrieved.
Why it happens
- 1SELECT @@old_passwords or reading another write-only system variable.
- 2Using SHOW VARIABLES for a variable that is not readable.
How to reproduce
trigger — this will error
trigger — this will error
SELECT @@old_passwords;
expected output
ERROR 1235 (HY000): Variable 'old_passwords' is a WRITE ONLY variable.
Fix
Do not read write-only variables; rely on configuration files instead
Do not read write-only variables; rely on configuration files instead
-- Check the value in my.cnf / my.ini or use SHOW VARIABLES LIKE 'variable_name'
Why this works
Write-only variables do not expose their value; use the configuration file as the source of truth.
Sources
Official documentation ↗
MySQL 8.0 — 1979 ER_VAR_CANT_BE_READ
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev