1558
MySQLERRORNotableEventsHIGH confidence
New event name is the same as the old name
Production Risk
Low — the ALTER EVENT fails; choose a different new name.
What this means
ER_EVENT_SAME_NAME (1558, SQLSTATE HY000) is raised when ALTER EVENT RENAME TO specifies the same name as the current event name.
Why it happens
- 1ALTER EVENT my_event RENAME TO my_event — renaming to the same name
How to reproduce
trigger — this will error
trigger — this will error
ALTER EVENT my_event RENAME TO my_event; -- Same name
expected output
ERROR 1558 (HY000): Same old and new event name
Fix
Use a different name when renaming the event
Use a different name when renaming the event
ALTER EVENT my_event RENAME TO my_event_v2;
Why this works
The new name must be different from the current name.
Sources
Official documentation ↗
MySQL 8.0 — 1558 ER_EVENT_SAME_NAME
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev