在2个MySQL服务器上同步表 [英] Synchronizing tables on 2 MySQL servers

查看:194
本文介绍了在2个MySQL服务器上同步表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2台MySQL服务器:一台用于开发,另一台用于生产.两者都包含相同的表结构,但是表上的数据不同.

I have 2 MySQL servers: one for development, other for production. Both contain same table structure, but different data on tables.

当我在开发服务器上完成更改后,例如将列添加到表中,之后我又对生产服务器进行了相同的更改.但这很容易发生错误,特别是如果一次要进行许多更改时.

When I have done change on dev server, like add column to table, I have manually made the same change later to production server. But this slow and error prone, especially if there are many changes to be made at once.

有更好的方法吗?我有phpMyAdmin,也许有一些巧妙的窍门?

Is there better way to do this? I have phpMyAdmin, maybe that has some neat trick?

此外,该过程有专门的术语吗?搜索表更新"或类似内容不会产生关于此主题的结果.

Also, is there a dedicated term for what this process is called? Searching for 'table update' or similar does not yield results on this topic.

忘记提及我正在使用Windows.

Forgot to mention that I am using Windows.

因此,显然,我需要某种比较工具.我还没有测试所有建议的软件,但是到目前为止,它们似乎非常有用.

So apparently I need some kind of diff tool for this. I haven't tested all of these proposed software yet, but so far they seem very useful.

推荐答案

我以前将Red Gate的SQL Compare用于SQL Server. 这是他们的MySQL产品.我没有自己买的预算,但是如果它能像SQL Compare一样工作,它将完全按照您想要的去做.

I've used Red Gate's SQL Compare before for SQL Server; this is their MySQL product. I don't have the budget to buy it myself, but if it works anything like SQL Compare did, it'll do exactly what you want it to do.

这篇关于在2个MySQL服务器上同步表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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