Symptoms
When trying to backup a cPanel account, you may find the following error happening regarding a database:
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'place_holder'': Column count of mysql.proc is wrong. Expected 21, found 20. The table is probably corrupted (1805)
Description
This generally occurs when the 'mysql_upgrade' command needs to be run; we can confirm that is the issue by looking for errors similar to this in the MySQL error log:
[2021-11-08 02:13:02 +0200] Cpanel::Exception::ProcessFailed::Error/(XID 5b64j2) “/usr/bin/mysqldump” reported error code “2” when it ended: mysqldump: Couldn't execute 'show events': Failed to open mysql.event (1545)
[2021-11-08 02:13:02 +0200] mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'place_holder'': Column count of mysql.proc is wrong. Expected 21, found 20. The table is probably corrupted (1805)
Workaround
To correct this, run the following command via SSH as the root user:
mysql_upgrade