1956
MySQLERRORCriticalStored RoutinesHIGH confidence
Failed to load routine. The table mysql.proc is missing, corrupt, or contains bad data
Production Risk
High — all affected stored routines are unavailable.
What this means
MySQL cannot load a stored procedure or function because the mysql.proc system table is corrupted, missing columns, or contains invalid data for that routine.
Why it happens
- 1mysql.proc table corrupted due to improper shutdown or disk failure.
- 2MySQL was upgraded without running mysql_upgrade, leaving mysql.proc in the old format.
- 3Manual edits or DELETE from mysql.proc that corrupted routine metadata.
How to reproduce
trigger — this will error
trigger — this will error
CALL my_proc(); -- fails because mysql.proc is corrupt
expected output
ERROR 1956 (HY000): Failed to load routine my_proc. The table mysql.proc is missing, corrupt, or contains bad data.
Fix 1
Run mysql_upgrade to repair system tables
Run mysql_upgrade to repair system tables
mysql_upgrade -u root -p
Why this works
mysql_upgrade checks and repairs all system tables including mysql.proc.
Fix 2
Repair the proc table and restore from backup
Repair the proc table and restore from backup
REPAIR TABLE mysql.proc; -- If corrupt, restore the routine from a mysqldump backup
Why this works
REPAIR attempts to fix table corruption; restore routines from backups if data is unrecoverable.
What not to do
✕
Version notes
Sources
Official documentation ↗
MySQL 5.7 — 1956 ER_SP_PROC_TABLE_CORRUPT
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev