I create 2 connectionsand then try to select the current active database:
$aaa_link = mysql_connect("host1","user1","pass1") or die(mysql_error());
$bbb_link = mysql_connect("host2","user2","pass2")or die(mysql_error());
mysql_select_db("dbname1", $aaa_link) or die(mysql_error());
However, mysql_select_db fails with error:
Access denied for user: "user2" to database "dbname1"
What is wrong here?