使 MySQL 架构在计算机之间保持同步 [英] Keep MySQL schema in sync between computers

查看:56
本文介绍了使 MySQL 架构在计算机之间保持同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发时,我可以使用 SVN 或 Git 来保持机器之间的代码同步.但是,我一直无法为 MySQL 找到类似的东西.有没有人知道什么?

When developing, I can use SVN or Git to keep code in sync between machines. However, I have been unable to find something similar for MySQL. Does anyone know of anything?

更新:我正在尝试跨机器获取架构更改.让数据同步也很好,但目前还没有那么重要.

Update: I am trying to get the schema changes across machines. Getting the data to sync as well would be great but is not as important at the moment.

推荐答案

数据不被视为应用程序源"的一部分.架构(即表、索引等的定义)应该被视为源代码的一部分,尽管很多人在谈到 MySQL 时并不介意.

Data is not considered a part of your "application source". The schema (ie definition of the tables, indexes etc) should be considered part of your source, although many people do not bother when it comes to MySQL.

如果您需要保持数据同步,您应该查看复制方案.

If you need to keep data syncronised, you should look at replication scenarios.

请参阅此关于 MySQL 复制

这篇关于使 MySQL 架构在计算机之间保持同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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