本文介绍了使用MySQL的双向复制以在多个脱机客户端之间同步数据库应用程序的实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是构建一个应用程序,其数据库后端需要在通常离线的未知数量的客户端上双向复制。在我详细解释之前,我的问题是MySQL复制是否可行这个项目,或者如果我应该研究其他技术。



这里是一般的用例:




  • 用户在个人笔记本电脑上安装软件。

  • 用户将数据从主数据库服务器加载到笔记本电脑上。 / li>
  • 用户从网络断开连接并继续远程操作此数据。

  • 用户远程连接到主数据库服务器以提交更改并检索



我没有任何类型的数据库复制的经验,所以这是一个有趣的挑战。 MySQL复制能完成我想要的吗?或者,你知道另一种技术,将更有效地完成这个MySQL吗?我已阅读文档(),它看起来更适合主/从复制。

解决方案

MySQL仅支持单向复制。



虽然这不直接回答你的问题,MS SQL Server 2008支持这种情况)非常好。



其实,你可以使用免费的MS ,减少了对多个SQL Server许可证的需求。



请查看Microsoft 。 / p>





这里还有论坛:


I am tasked with building an application whose database backend needs to be replicated in both directions over an unknown number of clients who are usually offline. Before I explain in detail, my question is whether MySQL replication is feasible for this project or if I should look into other technologies.

Here's the general use case:

  • User installs software on personal laptop.
  • User loads data from the master database server onto her laptop.
  • User disconnects from the network and proceeds to operate on this data remotely.
  • User remotely connects back to the master database server to commit her changes and retrieve any changes that have since been committed by other people (two-way synchronisation).

I have no experience with database replication of any kind, so this is quite an interesting challenge. Can MySQL replication accomplish what I'm looking for? Or, do you know of another technology that will accomplish this more effectively that MySQL? I've read through the docs ( http://dev.mysql.com/doc/refman/5.0/en/replication.html ) and it looks like it is more geared towards master/slave replication.

解决方案

MySQL supports one-way replication only.

While this doesn't directly answer your question, MS SQL Server 2008 supports this scenario (merge replication) very well.

In fact, you can use the free MS SQL Server 2008 Express on clients, reducing the need to have multiple SQL Server licenses.

Also, take a look at the Microsoft Sync Framework.

SQL Express - Client Synchronization Sample on MSDN

Microsoft Sync Framework Support in Visual Studio 2008

There are also forums here: SyncFx - Microsoft Synchronization Services

这篇关于使用MySQL的双向复制以在多个脱机客户端之间同步数据库应用程序的实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 02:51