title: How to Connect two databases on two different servers using php
body: <p>In MySQL, I have two different databases -- let's call them A and B.</p>
  
  <p>Database A resides on server server1, while database B resides on server server2.</p>
  
  <p>Both servers {A, B} are physically close to each other, but are on different machines and have different connection parameters (different username, different password etc).</p>
  
  <p>In such a case, is it possible to perform a connection between a table that is in database A, to a table that is in database B of different servers?</p>
  
  <p>If so, how do I go about it, programatically, in php? (I am using php, MySQLDB to separately interact with each one of the databases).</p>