Linking Two database to execute join query
You could make use of FEDERATED Tables. More on them: HERE. 

Basically, what you do, is to create a federated table on your local DB, based on the remote table (example in the link). Then you can join them, as they're both local. Everything is pretty straightforward, and explained in the link above.