Backup dies since last upgrade with error Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = ...

Since last Virtualmin/Webmin (?) not sure which one it was (it was on 14th of Sept), every day backup dies with message:

I get an email with message Failed backup of Virtualmin on mywebsite.co.uk:

Backup failed! See the progress output above for the reason why. Total backup time was 01 minutes, 09 seconds.

Virtual servers that failed : mywebsite1.com Sent by Virtualmin at: https://mywebsite.co.uk:2202

Creating backup for virtual server .. all goes fine

Creating backup for virtual server .. all goes fine (websites without databases)

then when it does MySQL dumps it gets to THIS:

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

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

and so on.. at the end it says

Backing up Virtualmin settings (Module configuration, Server templates and plans, New mailbox email messages, Custom fields, links and shells, Scheduled Virtualmin backups, FTP directory restrictions) .. .. done

Seems to be some kind of issue since MySQL got upgraded. Is there a way to fix this error? Not ready yet to kill myself, its only 3 days passed since this upgrade and I still have backup =)) Better than nothing. Tell me the good news please!

Status: 
Closed (fixed)

Comments

Looks like MySQL got upgraded without upgrading its database.

However, it seems that the error message has the solution in it. You should be able to SSH into your system as root and run :

mysql_upgrade -pXXX

where XXX is your MySQL root password.

do i have to do it for every website/database as I have number of them? i dont think i have root for mysql

No, you only need to do it once.

If you have root on the system, you can find the MySQL root password in the file /etc/webmin/mysql/config

Done it,
it went through pages of information and at the end was a lot of:

note: The storage engine for the table doesn't support repair
note: The storage engine for the table doesn't support repair
.......

will wait for the next backup to see if there is any errors..

UPDATE: looks like the problem is solved! Thanks!

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