Thomas’ Developer Blog

April 28, 2008

mySQL’s pesky little Error: 1005 errno: 150 issue solution

Filed under: sql — Tags: , , , , , , , , — sanzon @ 1:47 am

Alright, a lot of people probably get this a lot with mySQL.  Here’s the fact, there is a 99.999% chance your code is wrong and there is not a bug with mySQL.

The solution to this problem is actually really easy to figure out, it’s just that SQL has a horrible debuging scripts which make it a pain to figure out.

Just type:

Show innoDB status;

Read under the section: Latest Foreign Key Error, and there you go!  Your problem explained!  Just read it two or three times if you don’t get it.  Trust me it helps a lot.

Happy coding

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.