Just teaching myself a bit of MySQL and ran straight into a problem which seems to crop up a lot, but is answered less often:
I was trying to create a foreign key between two tables, referencing an integer id. I tried writing the alter table statement myself, and also tried a couple of GUI tools. No matter what I tried, I ran into Errno 150.
The solution turns out to be simple: Make sure the data type of the FK and the referenced column are exactly the same. In my case, I was trying to reference an unsigned int with a signed int.