1581
MariaDBERRORNotableLoggingHIGH confidence
Unsupported storage engine for log tables
Production Risk
Low — the ALTER fails; the log table is unchanged.
What this means
The specified storage engine is not supported for the general log or slow query log tables.
Why it happens
- 1Attempting to alter the general_log or slow_log tables to use an unsupported storage engine.
- 2Only CSV and MyISAM are supported for log tables.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE mysql.general_log ENGINE = InnoDB;
expected output
ERROR 1581 (HY000): Cannot be used as a log table because it doesn't have the correct storage engine
Fix
Use CSV or MyISAM for log tables
Use CSV or MyISAM for log tables
ALTER TABLE mysql.general_log ENGINE = CSV;
Why this works
MySQL log tables (general_log, slow_log) only support CSV and MyISAM storage engines.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 1581 ER_UNSUPORTED_LOG_ENGINE
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev