Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table join over two MySQL connections?

Status
Not open for further replies.

RbgoWeb

Programmer
Apr 10, 2002
91
NL
A shared hosting provider allows to setup 10 MySQL databases. The only thing is that each database is forced into having its own username and password, which means a separate connection has got to be made to each database.
Is there a way to join tables over the two connections?
 
Do you mean you have one database server, with one set of user accounts, but each database hosted by that server can only be accessed by certain of those users? If that is the case, then you could just give each database the same access rules; then there would be no problem mixing databases in the one query.

If however you are talking about separate database servers, then each would have to have its own unique connection. The only way you could pass data between them would be through file export/import.
 
Each database having its own username and password provides access to that database for a particular user. This implies a separate connection to the same database server, weather the access privileges for the databases are identical or not.

The site owner wants a free query page in the backend of the website, in which table joins can be made between two databases. I solved it by making a temporary copy possible of tables from one database into the one at which the queries are targeted. After querying the tables can be dropped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top