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.
1 2 3 4 5 6 7 8 | $ mysql_upgrade -u someAdminUserLotsOPrivs -p Enter password: Looking for 'mysql' as: mysql (...) SomeDabase.MyTable OK SomeDabase.YourTable OK SomeDabase.SomeonesTable OK (etc...) |
You can read more here http://dev.mysql.com/doc/refman/5.5/en/mysql-upgrade.html
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.
Thanks!
Excellent! Glad I could help relieve someone else’s pain! Thanks!
Thank you very much!! you saved me
My pleasure!
You saved my A** too, Was worried while upgrading but people(essentially saviors) like you asways save ametuers like us.
Thanks Man. Good Post it saved my time and reduced headache. keep doing great posts.
Thanks.
Glad I could help! Thank you!
Thanks, ran it and now no error in mysql workbench. Not sure why they just dont say run the upgrade..
Yeah, that would be nice! It was a good reminder for me to check that my backups were working though. Glad I could help!