如何从mysql访问postgres? [英] how to access postgres from mysql?
本文介绍了如何从mysql访问postgres?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以从MySQL访问Postgres数据库,以便我可以运行一个在两个数据库中的表之间进行联接的查询?
Is it possible to access a Postgres database from MySQL, so that I could run a single query that does joins across tables in both databases?
例如:
SELECT * FROM postgres.db1.table1 as t1, mysql.db2,table2 WHERE t1.id=t2.id;
推荐答案
根据MySQL 创建服务器文档:
According to the MySQL CREATE SERVER documentation:
wrapper_name应该是 mysql ,并且可以用单引号引起来. 当前不支持wrapper_name的其他值.
The wrapper_name should be mysql, and may be quoted with single quotation marks. Other values for wrapper_name are not currently supported.
因此答案为否,您目前无法执行此操作,但是您可以而是从PostgreSQL中访问MySQL服务器.
So the answer is no, you cannot do that at the moment, but you can access the MySQL server from within PostgreSQL instead.
这篇关于如何从mysql访问postgres?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文