title: Execute one MySQL query on multiple databases
body: <p>I have a simple question that keeps me up all night :( .</p>
  
  <p>Suppose we have 2 databases on different servers. You can easily create 2 connections and manipulate data in both databases.</p>
  
  <p>What if I want to execute one query on both databases?</p>
  
  <p>Example : </p>
  
  <pre><code>INSERT INTO database1.table1 
  VALUES ( 'one','two','three') 
  WHERE database1.table1.something LIKE (SELECT something from database2.table2)
  </code></pre>
  
  <p>Sorry for my code, I'm not really experienced with SQL code.</p>
  
  <p>Such attempts are possible when the databases are all accessible through the same connection.</p>
  
  <p>But is it possible to achieve the same result if the databases are on separate servers (when you need two connections) ?</p>
  
  <p>It would be so much easier for me if such a solution would exist :( .</p>
  
  <p>best regards</p>