MySQL: combining queries across multiple databases located on different servers

There is a way in SQL Server to join tables from multiple sql servers using reference tables .

I wonder if the same can be done? I am using PHP, does PHP provide this capability?

+2


source to share


2 answers


It's not always easy, but pretty, but this article provides some solutions to your problem: http://www.linux.com/archive/feature/52390

UPDATE

Since the link is gone now, here is the text



Creating a Linked Server Using OLE DB for SQL Server This example creates a linked server named MyDatabase that uses the Microsoft OLE DB Provider for SQL Server.

USE master
GO
EXEC sp_addlinkedserver 
'MyDatabase',
N'SQL Server'
GO

      

Then you can link as if they are on the same server, so if the databases are on the same mssql server, skip the above step and just follow these steps:

<server name>. [database name]. [owner] .table_name
+1


source


Try an integrated storage engine to bind to tables on other servers.



http://dev.mysql.com/tech-resources/articles/mysql-federated-storage.html

+2


source







All Articles