MySQL: Cannot load from mysql.proc. The table is probably corrupted

Ok this one sounds pretty scary, but more than likely you just upgraded MySQL didn’t you? Did you run mysql_upgrade?

Ok lets back up a bit. I just upgraded to MySQL 5.5.x using yum and a third party repo but when I tried to create a new function I got “Cannot load from mysql.proc. The table is probably corrupted” which is not the kind of message you want to receive on a Friday afternoon especially when it’s talking about a mysql.* table. Fortunately I was able to remain calm (primarily thanks to automated nightly backups) and think things through (primarily thanks to the quad iced latte on my desk).

The yum upgrade (or any other package manager I’m assuming) is not going to convert your tables for any changes that may be needed. That would be potentially changing your data which, in most cases would be poor form for the packages. Given peoples’ fly-by-the-seat-of-your-pants approach to upgrades, and the fact that backups usually only happen after things start to go wrong, you really want to keep that roll back path as much as possible.

From the command line you want to run mysql_upgrade, which works very much like any of the MySQL command line utilities to check every database and table (assuming the user has access) for compatibility problems, and attempt to fix them.

$ mysql_upgrade -u someAdminUserLotsOPrivs -p
Enter password:
Looking for 'mysql' as: mysql
SomeDabase.MyTable                         OK
SomeDabase.YourTable                       OK
SomeDabase.SomeonesTable                   OK

You can read more here

Category(s): Database Administration, MySQL, Server Administration
Tags: , , , , , ,

9 Responses to MySQL: Cannot load from mysql.proc. The table is probably corrupted

  1. Thank God for this post! You rock, man…
    Have to say, I was a bit uneasy when I saw the error but you and mysql_upgrade saved the day. Smilie: :)


    Nagesh Thati says:

    Thanks Man. Good Post it saved my time and reduced headache. keep doing great posts.

  2. Thanks, ran it and now no error in mysql workbench. Not sure why they just dont say run the upgrade..

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam protection by WP Captcha-Free