简体   繁体   中英

Querying with data from multiple databases

i have MySQL database db1 with data of user and it managers, and db2 with oter data related to user, but without user manager column. I need to query db2 and group data by user manager.

if they were on same server that would be easy.

do you have any suggestion how to do this, even on non query fashion?

NOTE: db1 and db2 are not on same server, and query will not contain just simple sums

You can try to use federated tables in MySQL, and it will let you access data from a remote MySQL database

You can check out this on given links below

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

http://dev.mysql.com/doc/refman/5.1/en/federated-create-server.html

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

I guess it may work for you.

Happy Coding!

Atul Jindal

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM