Column count of mysql.proc is wrong

All we need is an easy explanation of the problem, so here it is.

Im attempting to deal with a corrupted database with little success, when I try to alter this table I am giving the error

 Column count of mysql.proc is wrong

Looking up this error online gives me many results all saying the same variation of, you must run

mysql_upgrade

However when I run that I am greeted with

The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are  now done by the server.
To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade.
The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand.
It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.

However again another problem occurs any time I try to log into mysql from the command line, all attempts to log in respond with

Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect

This does make sense as localhost/phpmyadmin works just fine and I can create new tables or databases but I just cant alter the corrupt database

Any help is appreciated this is XAMPP on Ubuntu

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

I found a solution by just rm -rf the folder in the /var/mysql folder in xampp

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply