如何保持两个MySQL数据库同步? [英] How to keep two MySQL databases in sync?

查看:649
本文介绍了如何保持两个MySQL数据库同步?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使两个数据库保持同步?我有一个使用MySQL运行WordPress的客户端.有没有办法获取数据库当前状态的副本,并将其用于开发服务器,然后在完成开发更改后将其推回实时站点?

Is there a way to keep two databases in sync? I have a client who's running WordPress with MySQL. Is there a way to take a copy of the database the current state, and use it for a development server, and then when the dev changes are done push it back to the live site?

当我将在开发版本上工作时,客户端可能会更改实时站点,并想知道是否会有任何合并冲突.

The client might make changes to the live site while I'll be working on the dev version, and wondering if there will any merge conflicts.

如果我通过phpmyadmin导入更新的数据库,它将仅使用最新更改进行更新还是覆盖所有内容?

If I import the updated database via phpmyadmin, will it only update with only the newest changes or overwrite everything?

推荐答案

所以我终于找到了解决我问题的方法.由于这是WordPress的问题,所以我发现两个插件运行得非常好.

So I finally found a solution to my problem. Since this was an issue for WordPress I found two plugins that worked really well.

免费版:数据库同步
非常简单,并具有简单的推/拉界面.

Free one: Database Sync
Very simple and has an easy push/pull interface.

付费插件$ 40-200: WP迁移DB Pro
更加精致,可以选择要同步的特定表.

Paid Plugin $40-200: WP Migrate DB Pro
Much more polished and has an option to select specific tables you want to sync.

这篇关于如何保持两个MySQL数据库同步?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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