HelpSpa.com
Search HelpSpa.com

mySql error 1005 (errno: 150)

October 14, 2009DavidMySQL0

mySql error 1005 (errno: 150) solution

This mysql error occurs when creating a table with the InnoDB engine and is basically telling you that there is a “foreign key problem” with your schema.

The thing to check to fix this error is to make sure that your foreign key fields are of the same datatype as their source fields.

As an example, assume the main table is “people”, and the second table is “city”, and that you want the field “cityID” in the “people” table to relate to the “cityID” field in the “city” table. Make sure that both “cityID” fields are the same datatype (in this case INT).

Hope this helps.

Tagged ,

Related Posts

| More

SpiderOak Online Backup, Storage, Access, Sync, and Sharing

We are currently offering a free copy of our 16-page eBook, "How to Organize your Digital Photography Collection" to everyone who signs up for our free newsletter. This eBook will review how to organize your digital photos, discuss metadata, and give you an overview of software than can help you with your digital photography workflow. Sign up in the signup area, located in the right-side column of every page on this site, and read your copy now!


Popular