#1558 - Column count of mysql.proc is wrong. Expected 21, found 20. Please use mysql_upgrade to fix this error

6.5k Views Asked by At

I got this message when I try to run query on XAMPP in macOS

#1558 - Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100108, now running 100421. Please use mysql_upgrade to fix this error

I tried to write

'mysql_upgrade -u root -p'

on my terminal but I got this message

zsh: command not found: mysql_upgrade

3

There are 3 best solutions below

2
On

I also ran into same issue and after cracking my head for the past 10hrs, I finally realize how to perform the upgrade. U

go to your Mac terminal and paste the following code (if you are actually using XAMPP):

/Applications/XAMPP/xamppfiles/bin/mysql_upgrade -u root -p

Supply your root password and see it work like magic.

Contrary to what many people posted online by using /opt/lampp/bin

It always gives a zsh not found error.

I hope this helps you and in the future for others who might need it.

0
On

You could try switching to a different shell, say bash by typing bash in your terminal. Then proceed to run mysql_upgrade normally in the appropriate directory

0
On

I also could not run the code from the Terminal. I was, however, able to go to the folder itself and "run" the mysql_upgrade application. If you are using XAMPP and the Application Manager, there's a button to Open Application Folder. If you click that, finder will open where XAMPP lives. Open the bin folder. Then scroll until you find mysql_upgrade. Double click it. It will run in a Terminal session and complete the upgrade. Hope this helps someone else as I spent waaayyyy too much time trying to get this to work.