that just doesn’t sound right, does it. I just now noticed it when I ran my cron backup manually. Complete error is:
mysqldump: Couldn’t execute ‘SHOW FUNCTION STATUS WHERE Db = ‘your-db-here”: Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50077, now running 50152. Please use mysql_upgrade to fix this error. (1558)
so I ran mysql_upgrade , errored about password, then I ran mysql_upgrade -p and all was ok. Well, at least from the script point of view.
Running the backup again revealed another error:
Cannot proceed because system tables used by Event Scheduler were found damaged at server start (1577)
Reading about it on the net, somebody suggested a mysql restart after running the mysql_upgrade script adn what do you know, it did it.
Do note that you need to be logged as root for that command line to work. Otherwise, make sure to specify root user in the command line.
One thing that I did notice a while ago was that the “all” backup (which dumps all tables) was failing, but I didn’t give it too much attention since the per-table backups were ok. Seems this upgrade thing solved that issue as well.
This one was simple















Thank you so much for this! I was trying to perform a data transfer from one host to another and encountered the exact same problem.
I also needed to specify a user with the password:
> mysql_upgrade -u admin_larry -p;
then…
> service mysqld restart
and all is well
Thank you very much for your blog.You saved my valuable time to get resolve this issue as I am not able to take backup of any of my data bases.
all working charm now
I had this problem for months untill I decide to look on google for it and your solution works perfect! Thank you
To fix this, run the following on the server’s command line.
srv # mysql_upgrade -h localhost -u root -p
# For Plesk environments
srv # mysql_upgrade -h localhost -u admin -p`cat /etc/psa/.psa.shadow
Thank you for this solution. It works great. I was having the same problem.
So I tried running this… and I get an error:
mysql_upgrade -h localhost -u root -p
Enter password:
Looking for ‘mysql’ as: mysql
Looking for ‘mysqlcheck’ as: mysqlcheck
sh: -c: line 0: unexpected EOF while looking for matching `”
sh: -c: line 1: syntax error: unexpected end of file
Running ‘mysqlcheck’ with connection arguments: ‘–host=localhost’
sh: -c: line 0: unexpected EOF while looking for matching `”
sh: -c: line 1: syntax error: unexpected end of file
FATAL ERROR: Upgrade failed
looking over some google search results, the most probable cause would be that you have mysql fed from multiple repositories. You will have to somehow undo updates from the alien repos and then try again.
Other than that, no clue what could cause it. If that doesn’t work, hit the mysql forum maybe you get luckier
Hi,
-bash: mysql_upgrade: command not found
can I do that?
Do you have mysql installed? if so, maybe it’s a path issue. Normally, that application should be in /usr/bin/mysql_upgrade