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

I was trying to create stored function in MySQL and kept getting the above error. Googling didn’t give me much help, other than suggesting to look in /var/log/syslog.

I’d read that this error can be caused by an incomplete upgrade. Although this was a fresh install of MySQL, I had restored all of the databases from another server on to it. However in syslog, it said:

Aug 2 13:23:09 Hunt /etc/mysql/debian-start[7572]: /usr/bin/mysqlcheck: Got error: 1045: Access denied for user ‘debian-sys-maint’@'localhost’ (using password: YES) when trying to connect
Aug 2 13:23:09 Hunt /etc/mysql/debian-start[7572]: FATAL ERROR: Upgrade failed

I think the restore had overwritten the password for debian-sys-maint, so I grabbed what it thought password should have been from /etc/mysql/debian.cnf, set it correctly and restarted MySQL. This time it reported that an upgrade was not necessary, but still I was getting “Cannot load from mysql.proc. The table is probably corrupted”. The clue lay in syslog:

Aug  2 13:33:36 Hunt /etc/mysql/debian-start[8236]: This installation of MySQL is already upgraded to 5.5.24, use –force if you still need to run mysql_upgrade

Running this command fixed it:

mysql_upgrade –force -u root -p

Hope this is helpful to someone!

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>