Trouble adding a foreign key relation to your MySQL table?

Getting weird errors about 1005 and/or 150, “can’t create table #blahblahblah”? Perhaps MySQL can’t find the index on the column in your target table:

http://bugs.mysql.com/bug.php?id=16290

I needed to create an additional index even though my referenced column was the primary key. No idea why yet, but I figured I’d record this.



Me on a beautiful early spring day in Napa, in a field of mustard.

Steven Lybeck


  • ph: 415.830.3274

  • View Steven Lybeck's profile on LinkedIn
  • My status