3342
MariaDBERRORCommonSecurity / KeyringHIGH confidence
Keyring file has incorrect permissions
Production Risk
Critical — server may refuse to start; encrypted tablespaces become inaccessible.
How to reproduce
trigger — this will error
trigger — this will error
-- Error at server startup when keyring_file plugin initialises.
expected output
ERROR 3342 (HY000): Keyring file has insecure permissions.
Fix
Fix file permissions
Fix file permissions
-- OS command: chmod 600 /var/lib/mysql-keyring/keyring && chown mysql:mysql /var/lib/mysql-keyring/keyring
Why this works
Restricting to owner-only read/write prevents unauthorized access to encryption keys.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3342 ER_KEYRING_WRONG_FILE_PERMISSION
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev