MacPorts: MySQL upgrade from 5.0.x to 5.1.x gives error during insert ( mysql_upgrade / ERROR 1558 (HY000) )

Yesterday I upgraded my mysql from 5.0.x to 5.1.x. After upgrade inserts started to fail with this error:

ERROR 1558 (HY000) at line 146: Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50067, now running 50142. Please use mysql_upgrade to fix this error.

After little bit of google I found this solution. You need to run following command.

sudo  /opt/local/lib/mysql5/bin/mysql_upgrade -uroot -p –basedir=/opt/local/lib/mysql5/bin/mysql

This fixed my db issues. Hope this helps…

3 thoughts on “MacPorts: MySQL upgrade from 5.0.x to 5.1.x gives error during insert ( mysql_upgrade / ERROR 1558 (HY000) )”
  1. Thanks, dont understand why it had to show that error.. Been upgrading mysql for years, 5.0 to 5.1 wasnt that great for me.

    But thank you for posting the solution.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.