I know the post is 3 years old now , but if someone still in same situation .
Try checking the storage engines
of tables on both ends(machines) which you are comparing .
> show table status
Usually InnoDB has slower insertion due to the fact it supports txns and will flush logs to disk on each commit . So even if you don't explicitly mention your query under txn , it will commit query each time it is run .
MyISAM on the other hand does not support TXNs , hence faster insertion and no overhead of logging to disk .
You can either change the default-storage-engine in the my.cnf file or you can surround your loop which has insertions by a txn .
Check out this for more info https://stackoverflow.com/a/9819330/3820753