使用不同的服务器或计算机将记录从一个数据库同步到其他数据库 [英] Sync Records from one database to other with using different server or machine

查看:184
本文介绍了使用不同的服务器或计算机将记录从一个数据库同步到其他数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个不同的数据库在不同的machine.Both有相同的表,我只想插入或更新记录从一台机器到其他。如何使用mysql数据库。

I have two different database in different machine.Both the have same tables and i just want insert or update records from one machine to other. how can i do same with using mysql database.

假设我的系统在印度,另一个在美国。

Suppose one of my system is on India.and other one is on USA.

这不是基于Web的应用程序。

It is not web based Application.

推荐答案

听起来你可能想让一个数据库作为从属到另一个,那样主机上的任何更新将自动传播到从属。 MySQL文档有很多的详细信息。

Sounds like you probably want to make one of the databases act as a slave to the other, that way any updates on the master will be automatically propagated to the slave. The MySQL documentation has quite a lot of detail on this.

如果你想能够更新任何一个数据库,并将它们复制到另一个我认为也可以配置MySQL使用多主复制。

If you wanted to be able to make updates to either database and have them replicated to the other I think it is also possible to configure MySQL to use multi-master replication.

这篇关于使用不同的服务器或计算机将记录从一个数据库同步到其他数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆