Both databases have the same schema, but they may experience conflict with primary key in some tables. So I want them to just ignore the duplicate rows, and continue merging
You could just add an additional field (called DatabaseID for example) to the all the tables in your merged database and add it to the Primary Keys. This way you can keep the original keys, while having unique keys in the merged database - and you can tell which database the row has come from. This is what SQL-Hub does - if it's just a one off job you can do this with the free trial.