15 Feb
If you’re trying to import an sql file using symfony propel-insert-sql and you get this error :
ERROR 1005 (HY000): Can't create table 'Table.frm' (errno: 150)
check this command output it’s really helpful :
mysql>SHOW ENGINE INNODB STATUS;
it will give you the detailed explanation about the most recent innoDB foreign key error.
If you are using a mysqldump file add these commands at the top and bottom of the sql file
SET FOREIGN_KEY_CHECKS = 0; -- TOP SET FOREIGN_KEY_CHECKS = 1; -- BOTTOM
that will disable constraints check
18 Responses
John
23|May|2008 1Thanks for the post! Ya saved me some time this morning :-)
Also, that’s a pretty cool plugin for displaying code (assuming its a plugin).
brainfault
24|May|2008 2you’re welcome ;-)
yes, the plugin is cool you can grab it from http://wordpress.org/extend/plugins/google-syntax-highlighter
Jan
10|Jun|2008 3good!
when I use solidDB ,I meet this question too.
^&^
Tom
29|Jun|2008 4Thanks for that initial post… exactly what I needed.
mark
29|Jul|2008 5i had sucessfully created table on mysql, but frm file the table i was create cann’t found.
please help me..
thanks.
Jacopo agile coach
30|Jul|2008 6Dont’ forget to have the referencing field type matching the referenced field type. Foreign key field must not be too narrow or too wide compared with referenced primary key.
Ciao!
CommanderZ
03|Sep|2008 7Positioning is broken in opera 9.52
Vajahat Ali
08|Sep|2008 8Thanks buddy for the help!!!
redsonic
11|Nov|2008 9Hi and thank you for this post, it helped me a lot.
Best regards
moltar
29|Nov|2008 10This is genious, thanks! I spent like 3 hours trying to figure this out. I had a dup key name, from a previously created table! Wow.
cwxwwwxdfvwwxwx
25|Dec|2008 11well, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch ;)
thesaintbug
26|Jan|2009 12That was really helpful…
thnx
JJ
04|Feb|2009 13Nice tip. Just what i was looking for. Also, im interested in integrating your code theme into my wordpress blog. Was it included in a theme or do you have a js script?
Thx,
JJ
Slovnik
13|Feb|2009 14Thanks, it really helped me a lot. I’m using propel from symfony and wanted to use a part of the generated SQL, but it didn’t work work without these two commands.
Tanuja
29|Apr|2009 15It helped me a lot. After breaking my head on debugging I got your post and it took second to fix the “ERROR 1005 (HY000): …….(errno: 150)”. Thanks a lot
Kenny
30|Apr|2009 16great this helped me out too! thanks!
Ashrafuzzaman
18|Jun|2009 17Thanks man
Helped a lot
Markus
23|Jun|2009 18I read that and found no answer for my case.
The key behind is more simple than we might know or think that it is.
Add a simple UNIQUE (column_name) where you know those entries are really unique.
MySQL do not know this, so you have to identify this for the logic in mysql and all goes right !
Chears n Beers
Leave a reply
Search
Tag Cloud
django gedit javascript jquery linux mysql oracle php pin propel python selectbox symfony textmateCategories
Blogroll
A design creation of Design Disease
Copyright © 2007 - Brainfault - is proudly powered by WordPress
InSense 1.0 Theme by Design Disease brought to you by HostGator Web Hosting.