mysql dump fails when trying to do a backup

After I setup Virtualmin and created the first virtual server I installed egroupware. The install failed with some message that it needs php 5.3 and I had a lower version, I then installed php 5.3 and then the installer succeeded. Setup everything, mail and everything else. Decided to try a backup using Amazon S3, but the backup failed when it got to mysql with the following error:

mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'nstopmanagement'': Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50077, now running 50150. Please use mysql_upgrade to fix this error. (1558)

I tried to use mysql_upgrade but got some access error for root@localhost, tried to install latest version of mysql and found I am already running latest 5.1.5 of mysql. Any ideas or suggestions what to try ?

Thanks, Rudy

Status: 
Closed (fixed)

Comments

I've seen this happen when the MySQL packages were upgraded but the database meta-tables were not.

Running mysql_upgrade is the right fix. However, it will need to know your root password for the database, so you should run :

mysql_upgrade -pXXX

where XXX is the password.

This fixed it and then the backup was successful. Thank you much for the quick and accurate response.

Automatically closed -- issue fixed for 2 weeks with no activity.