Common SQL Errors

MySQL Error 1579 ER_UNSUPORTED_LOG_ENGINE - How to Fix and Prevent

Galaxy Team
August 7, 2025

<p>MySQL raises ER_UNSUPORTED_LOG_ENGINE when you attempt to create or alter a log table using a storage engine that MySQL does not allow for logging.</p>

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error code 1579 ER_UNSUPORTED_LOG_ENGINE?

<p>MySQL Error 1579: ER_UNSUPORTED_LOG_ENGINE occurs when a log table (general_log or slow_log) is assigned an unsupported storage engine. Restore the table to a permitted engine such as CSV or MyISAM, or switch logging output to FILE to resolve the issue.</p>

Error Highlights

Typical Error Message

This storage engine cannot be used for log tables"

Error Type

Storage Engine Error

Language

MySQL

Symbol

ER_UNSUPORTED_LOG_ENGINE

Error Code

1579

SQL State

HY000

Explanation

Table of Contents

What is MySQL Error ER_UNSUPORTED_LOG_ENGINE?

MySQL returns error 1579 with the message ER_UNSUPORTED_LOG_ENGINE when the server detects a log table that uses a storage engine it cannot manage. The affected tables are mysql.general_log and mysql.slow_log when log_output is set to TABLE.

Because the server depends on predictable, lightweight writes for logging, only specific engines are allowed. Using an engine outside the whitelist blocks logging and triggers this error.

What Causes This Error?

Changing the storage engine of general_log or slow_log to InnoDB or another engine not approved for logging causes immediate failure the next time logging is enabled.

Importing a dump from another instance where log tables used a different engine also raises the error during restore.

Upgrading MySQL without recreating the log tables can leave them on legacy engines that the newer version disallows.

How to Fix MySQL Error ER_UNSUPORTED_LOG_ENGINE

First, disable TABLE logging so the server stops writing to the unsupported tables. Next, rebuild the log tables with a supported engine. Finally, re-enable TABLE logging.

If you prefer file-based logs, set log_output to FILE and leave the tables unused.

Common Scenarios and Solutions

Scenario: DBA altered mysql.slow_log to ENGINE=InnoDB. Solution: Recreate the table with ENGINE=CSV.

Scenario: Restored a mysqldump from MariaDB that used Aria engine. Solution: DROP and CREATE the log tables with MyISAM or CSV.

Best Practices to Avoid This Error

Lock down DDL on the mysql schema so only privileged users can modify system tables.

Automate checks in CI to validate that log tables use permitted engines before applying schema migrations.

Related Errors and Solutions

ER_CANT_CREATE_LOG_FILE - Raised when MySQL cannot write to the logging directory. Fix by correcting file permissions.

ER_TABLEACCESS_DENIED_ERROR - Occurs when the server account lacks rights to write the log table. Grant INSERT on mysql.general_log.

Common Causes

Using InnoDB for Log Tables

Altering general_log or slow_log to ENGINE=InnoDB blocks the lightweight insert pattern MySQL expects, triggering the error.

Importing Dumps With Unsupported Engines

Dump files from different MySQL variants may recreate log tables with engines like Aria, causing failure on restore.

Version Upgrade Mismatch

Upgrading to a release that tightens engine rules leaves existing log tables in an invalid state until rebuilt.

Accidental DDL in Automation

Schema-wide ALTER scripts that blanket-convert tables to InnoDB can catch the mysql system schema by mistake.

Related Errors

ER_CANT_CREATE_LOG_FILE (Error 1005)

File-based logging failed due to missing directory or permissions. Resolve by fixing path ownership.

ER_TABLEACCESS_DENIED_ERROR (Error 1142)

User lacks INSERT rights on mysql.general_log, blocking log writes. Grant the privilege to the MySQL system account.

ER_NO_SUCH_TABLE (Error 1146)

Log table was dropped but logging is still set to TABLE. Recreate the table or switch to FILE output.

FAQs

Can I use InnoDB for general_log in modern MySQL versions?

No. Even recent releases restrict log tables to lightweight engines such as CSV and MyISAM.

Will disabling TABLE logging lose historical data?

Switching to FILE keeps existing rows intact. Recreate tables first if you need continuous in-table history.

How do I audit changes to log tables?

Enable MySQL audit plugin or track DDL through a tool like Galaxy, which records run and edit history.

Does this error affect replication?

The error is local to the instance and does not break replication, but it can hide performance issues if slow query logging is disabled.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo