MySQL 'LOAD DATA INFILE' : Can't replace entry when foreign key exists
http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html

The above link clearly explains that mysqldump too puts set foreign_key_checks = 0; in the dump file so that data can be restored without the foreign key constraint error. I have always used set foreign_key_checks = 0 for importing data into tables and then set it back to 1.