Archive for January, 2010

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…