1593
MySQLERRORCommonEventsHIGH confidence

Event data too long

Production Risk

Low — the CREATE EVENT fails; no event is created.

What this means

The event definition (name, body, or other attributes) exceeds the allowed length.

Why it happens
  1. 1The event name exceeds 64 characters.
  2. 2The event body SQL is too large to be stored.
How to reproduce
trigger — this will error
trigger — this will error
CREATE EVENT a_very_long_event_name_that_exceeds_the_maximum_allowed_length_of_sixty_four_chars
  ON SCHEDULE EVERY 1 HOUR DO SELECT 1;

expected output

ERROR 1593 (HY000): Column count of mysql.event is wrong. Expected 22, found 22. The table is probably corrupted

Fix

Shorten the event name

Shorten the event name
CREATE EVENT short_name ON SCHEDULE EVERY 1 HOUR DO SELECT 1;

Why this works

Event names must be 64 characters or fewer.

Sources
Official documentation ↗

MySQL 8.0 — 1593 ER_EVENT_DATA_TOO_LONG

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

← All MySQL errors