How can I merge two *separate* MySQL databases into one, but avoid duplication?

zoldos

Well-known member
I have two MySQL databases setup, with both having the table “xf_user”, and the columns “email” and “username”. They both have other columns, but not all match. I just want to merge those two particular columns, overwriting/skipping duplicates, to make one unified DB.

I’m not quite sure how to proceed. Any assistance would be most appreciated!
 
Hmm..... I didn't think of that. But the two DBs I want to merge are not part of a site. They are just the raw DB, so I assume I'd need a query...
 
Install XF as a test installation.

Import the first database.

Import the second database.
 
Top Bottom