Column Count of MySQL.Proc Is Wrong. Expected 20, Found 16. the Table Is Probably Corrupted

Problems in creating stored procedure in phpmyadmin, column count mysql.proc is incorrect

Thanks for commenting @nbk

your link gave me a way to fix this issue

Any one who is facing same issue here is the answer
you can access mysql in the terminal using

  1. /opt/lampp/bin/mysql -u root -p
  2. after that enter the mysql user password if it worked well then type exit
  3. and now type sudo /opt/lampp/bin/mysql_upgrade -u root -p , enter your password and tadam , here is your mysql upgraded

really appreciate your help @Bohemian, @nbk,
Now I am able to create the Stored Procedure without facing any issue

ERROR 1805 (HY000): Column count of mysql.user is wrong. Expected 43, found 45. The table is probably corrupted

I tried the solution posted on a lot of forums

mysql_upgrade --force -uroot -p

But this didn't give the expected results.

So I comparated the fields list from a brand new mysql community server and mine. And discovered that the 3 problematic fields where:

  • is_role
  • default_role
  • max_statement_time

So I did:

mysql -e "ALTER TABLE mysql.user DROP COLUMN is_role, DROP default_role, DROP max_statement_time" -uroot -p

And this worked



Related Topics



Leave a reply



Submit