MySQL: SHOW FUNCTION STATUS WHERE Db = ‘name’: Cannot load from mysql.proc. The table is probably corrupted

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, June 25, 2012

Follow me on Twitter as @mattiasgeniar

If you recently upgraded from a MySQL 5.0 or 5.1 to the latest MySQL 5.5, you can run into the following error in logs/back-up scripts.

mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db ='something'': Cannot load from mysql.proc. The table is probably corrupted (1548)
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'somethingelse'': Cannot load from mysql.proc. The table is probably corrupted (1548)
...

The reason why is because MySQL 5.5 provided an update to the schemas, which are not automatically applied to already existing databases. To provide that schema update, it’s important to run the MySQL upgrade command, as it also helps with missing tables or prefixed tables.

The command is run as follows.

$ mysql_upgrade

If you’re getting an access denied error, pass along the username + password.

$ mysql_upgrade
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect
FATAL ERROR: Upgrade failed
$ mysql_upgrade -u root -p

That should solve your problem. If it does not, have a look at your MySQL logfiles for more indications.



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.