Mysql version of database link?
am 07.12.2009 19:16:55 von bcantwell
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...
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: Mysql version of database link?
am 07.12.2009 19:41:30 von edberg
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-eng ine.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 edberg@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=gcdmg-mysql-2@m.gmane.org
Re: Mysql version of database link?
am 07.12.2009 19:46:55 von Johan De Meersman
--001636c5a4bdaeed08047a27e10f
Content-Type: text/plain; charset=ISO-8859-1
The FEDERATED engine is what you're looking for, but it probably doesn't
quite do what you expect. Full documentation is at
http://dev.mysql.com/doc/refman/5.0/en/federated-storage-eng ine.html .
The major gotcha - in my opinion - is that it doesn't actually use indices.
If you only need to run selects on data that's been inserted remotely, you
might be better served by replicating the remote tables you need to your
local server.
On Mon, Dec 7, 2009 at 7:16 PM, 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...
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=vegivamp@tuxera.be
>
>
--001636c5a4bdaeed08047a27e10f--