Merging Categories from Two WordPress databases

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