是否可以在不同的主机中仅复制一个具有不同mysql数据库的表?

时间:2022-10-21 22:45:07

I'm trying to do replication of one table in a remote host in my database. Suppose there is a change in the remote database and i want it commited or replicated to my database in order to keep it up to date with the lastest changes without having to run any dumps, cron scripts or something similar. Is there any way to replicate only one table from a remote database into a table inside the database in the host that i'm working with? By the way, i'm using mysql databases in a freebsd based systems both places.

我正在尝试在我的数据库中的远程主机中复制一个表。假设远程数据库中有一个更改,我希望它被提交或复制到我的数据库,以便使其保持最新的最新更改,而无需运行任何转储,cron脚本或类似的东西。有没有办法只将一个表从远程数据库复制到我正在使用的主机中的数据库内的表中?顺便说一句,我在两个地方使用基于freebsd的系统中的mysql数据库。

Thanks for advance

谢谢你提前

2 个解决方案

#1


4  

One possible solution would be to use FEDERATED engine (possibly coupled with event scheduler to update your local table)

一种可能的解决方案是使用FEDERATED引擎(可能与事件调度程序结合以更新本地表)

#2


0  

Answering this in order to help persons who may end up here searching.

回答这个问题是为了帮助那些可能最终在这里搜索的人。

You can use MySQL Replication with replicate-wild-do-table configuration option to get this done.

您可以将MySQL Replication与replicate-wild-do-table配置选项一起使用来完成此操作。

#1


4  

One possible solution would be to use FEDERATED engine (possibly coupled with event scheduler to update your local table)

一种可能的解决方案是使用FEDERATED引擎(可能与事件调度程序结合以更新本地表)

#2


0  

Answering this in order to help persons who may end up here searching.

回答这个问题是为了帮助那些可能最终在这里搜索的人。

You can use MySQL Replication with replicate-wild-do-table configuration option to get this done.

您可以将MySQL Replication与replicate-wild-do-table配置选项一起使用来完成此操作。