is there some way to give me the order in which inserts should be made so all FK constraint are met? I have a mysql 5.6 schema with about 60 tables. I need to write some code (not sure if it will be Sql or java) to populate the data. The schema has lots of FK etc. 

Is there some good way (I am thinking some tool, script...) I could use that will look at the metadata of the DDL and tell me in which order should I insert data in the tables so all FK are met?

I obviously want to avoid trial and error...
The output of such script/tool would be for example:
1. insert into country/continent tables
2. insert person
3. insert ocupation/cv
If you are sure enough that all constraints would be met..You can think off turning off the foreign key checks and after making sure that all constraints are ok, you can turn on foreign key checks.
You can write a script to verify that if all constraints are ok. 

use  following to turn off foreign key checks  


  set foreign_key_checks=0  


use following to turn on checks again after necessary verification


  set foreign_key_checks=1


Hope it helps