Actually by your response I was able to figure out what the problem
was and what the solution needs to be, that is I should have used
localhost as the host address for mysql connect command rather than host.
However I have another question:
How do you maintain, or better said identify, 2 or more different MySQL
connections in a single Php program?
That is say I connect to server1 via this command:
I checked this link but cannot see how one specifies the database to
use in a query!
Can you kindly give an example of how one does this?
That is how does one specify which database connection to use in a
MySQL command when multiple database connections have to be open
in a Php program?
That was not my question at all.
My question, in case it was not clear last time, is that do we need to specify which MySQL connection to use only in mysql_query() or are there other
Mysql Php commands in which we need to specify which MySQL connection to use when more than one MySQL connection has been opened.
But FYI as I have been programming with this since few a days ago,
I can give you this lil tip:
in fact you do not need to specify the db connection but in the
mysql_query command since in all mysql commands in between 2 different mysql commands you end up referring to the data set from the last mysql_query command so same DB connection is used. Although, I am sure there will be some exceptions, this seems to be a pretty solid and useful rule.