Originally found here: http://www.stetsenko.net/2008/10/mysql-how-to-ignore-checking-of-foreign-key-constraints-for-innodb-tables/
Making a note of it here because it always take me a while to find the above article.
You can switch off checking of foreign keys while you truncate/populate the tables in a MySQL database with:
SET FOREIGN_KEY_CHECKS = 0;
and re-enable it with: