title: How to use multiple database on different host using php?
body: <p>I have this array that store the connection info and i want to use it when perform the query</p>
  
  <pre><code>$dblist = array();
  
  $dblist[] = array(
          'host'=&gt;'192.168.1.20',
          'username'=&gt;'root',
          'password'=&gt;'root1',
          'database'=&gt;'unsubscribe_1',
          'table'=&gt;'subscribers'
          );
  
  $dblist[] = array(
          'host'=&gt;'192.168.1.5',
          'username'=&gt;'root',
          'password'=&gt;'root2',
          'database'=&gt;'unsubscribe_test',
          'table'=&gt;'subscribers2'
          );
  
  
  foreach($dblist as $list)
  {
  $host = $list['host'];
  $username = $list['username'];
  $password = $list['password'];
  $db = $list['database'];
  $tb = $list['table'];
  
  $conn1 = mysql_connect($host,$username,$password) or die(mysql_error());
  mysql_select_db($db,$conn1) or die(mysql_error());
  
  $sql = "select * from $db";
  $query = mysql_query($sql,$conn1) or die(mysql_error());    
  }
  </code></pre>
  
  <p>The problem is i keep getting this error "Host '192.168.1.5' is not allowed to connect to this MySQL server"</p>
  
  <p>What is the problem here?</p>