Relationships between two table on different db?

UsersDB.favorites <-> CmsDB.posts

On “Users” server we must save from “Cms server”.

We have idea to create Posts model @ Users server and connect this model to other db server, then create relations ships between favorites & posts.

Now, how to define / set other db connection to this new Postings model using SSH?