At 12:16 PM -0600 12/7/09, Bryan Cantwell wrote:
Does anyone have a suggestion on how a database link (like in Oracle) could be established between two Mysql databases on different servers? It would be awesome if I could write sql that will query both databases in one query...


You are probably looking for federated tables:

        http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html

And just for completeness, one can query multiple databases on the same server using the database.table.column syntax, eg:

        select db1.table1.column1 as a, db2.table2.column2 as b;

One could also replicate a remote database to your server, and use the db.table.column notation:

        http://dev.mysql.com/doc/refman/5.0/en/replication.html

I'm guessing the latter two options are not what you are asking for, but I include for completeness.

DISCLAIMER: I haven't used federated tables yet...

        - steve

--
+------------------------------------------------------------------------+
| Steve Edberg                                  edb...@edberg-online.com |
| Programming/Database/SysAdmin            http://www.edberg-online.com/ |
+------------------------------------------------------------------------+

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to