Be careful when you define foreign key constraints.
In short the table/column you are trying to refer as foreign key doesn’t exist.
Here’s the explanation , Basically: Continue reading
I got this Error while importing big DB into MySQL.
ERROR 145 (HY000) at line 9125: Table './mysql/proc' is marked as crashed and should be repaired<br />
I was able to fix this issue by just running below from terminal.
mysql -uroot -p -e "use mysql; repair table proc;"
Hope it helps someone too.