3195
MariaDBERRORCommonAccess ControlHIGH confidence

SET PERSIST_ONLY denied — insufficient privileges

Production Risk

Low — access error; no data changed.

Why it happens
  1. 1User lacks the SYSTEM_VARIABLES_ADMIN or SUPER privilege required for SET PERSIST_ONLY.
  2. 2Attempting to persist read-only system variables without elevated access.
How to reproduce
trigger — this will error
trigger — this will error
SET PERSIST_ONLY innodb_buffer_pool_size = 134217728;

expected output

ERROR 3195 (HY000): SET PERSIST_ONLY failed: Access denied.

Fix 1

Grant SYSTEM_VARIABLES_ADMIN privilege

Grant SYSTEM_VARIABLES_ADMIN privilege
GRANT SYSTEM_VARIABLES_ADMIN ON *.* TO 'user'@'host';

Why this works

SYSTEM_VARIABLES_ADMIN allows SET PERSIST and SET PERSIST_ONLY.

Fix 2

Use SUPER as an alternative

Use SUPER as an alternative
GRANT SUPER ON *.* TO 'user'@'host';

Why this works

SUPER implies SYSTEM_VARIABLES_ADMIN for this operation.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3195 ER_PERSIST_ONLY_ACCESS_DENIED_ERROR

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

← All MariaDB errors