Recently I was reviewing log files for one of my servers and came across the following error message:
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'mysql'': Cannot load from mysql.proc. The table is probably corrupted (1728) mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'mydatabase'': Cannot load from mysql.proc. The table is probably corrupted (1728)
Worried that I was having some kind of corruption in all my databases, I immediately search the web for those error messages. What I found was after I had upgraded my server’s software I needed to run a MySQL/MariaDB specific upgrade command to upgrade the file organization for the new version.
Why the software cannot recognize the older format and suggest the following I do not know. But here is what you need to do after upgrading the system’s software:
sudo mysql_upgrade -u root -p
The user specified does not need to be root, but it does need full access to all the databases on your system. The sudo is need to avoid the following error.
Could not create the upgrade info file '/var/lib/mysql/mysql_upgrade_info' in the MariaDB Servers datadir, errno: 13
This error showed up on a Debian 11 (bullseye) system. On my Ubuntu systems I have not seen this error, so the package management upgrade may handle the package specific upgrade.