Merging Categories from Two Wordpress databases

Does anyone know how I can merge categories from two different databases?