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

查看:44
本文介绍了如何保持两个 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 Migrate 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天全站免登陆