MYSQL error (1547): Column count of mysql.proc is wrong

MYSQL error (1547): Column count of mysql.proc is wrong
5 (100%) 7 votes

MySQL Problem: Column count of mysql.proc is wrong. Expected 20, found 16. The table is probably corrupted.

That was the error seen on the MYSQL shell when I was about to generate a MySQL dump . It simplydenied me showing me that error, I couldn’t ran any SQL operation at all.

This happened when I was migrating a single database from MYSQL 5.1 to MySQL 5.6, every time I tried to restore a .sql file it simply showed me this error.

MySQL Problem: Column count of mysql.proc is wrong. Expected 20, found 16. The table is probably corrupted

What is mysql.proc used for?

mysql.proc system table is used to store procedures and stored functions. It’s pretty similar to the data you will find on INFORMATION SCHEMA.ROUTINES table.

Why is my mysql.proc table corrupted?

it ofen happens when your mysql crashes after high load average, or when you not upgrade your mysql version in a good way. Luckly, this mysql.proc corrupt table can be fixed easily.

Fix MYSQL error (1547): Column count of mysql.proc is wrong error

In order to fix this corruption on mysql.proc table, you will need to run the mysql_upgrade command as root or using sudo. See below:

mysql_upgrade --force -uroot -p

That’s all, now your mysql.proc table should be fully repaired and working again.

Further reading: