记录 MySQL Diff 的方法?
我现在正在开发一个项目,该项目要求我使用 CMS 对数据库进行多项更改,稍后我将需要这些更改,以便创建安装后配置文件以重用这些更改。我知道有很多基于 Windows 的程序可以向您展示 MySQL 差异,但是 Linux 呢?我希望能够保留我的更改的附加日志,以便我知道幕后到底发生了什么。
理想的情况是我可以捕获后状态和当前状态,比较它们并聚合输出。有谁知道如何做到这一点?
I'm working on a project right now that required me to use a CMS that makes multiple changes to a database, I'll need those changes later in order to create a post install configuration file to reuse those changes. I know that there are lots of Windows based programs that will show you MySQL Diffs, but what about Linux? I would like the ability to keep an appending log of my changes so I know what exactly is going on under the hood.
The ideal scenario would be that I can capture a post and current state, compare them, and aggregate the output. Does anyone know a way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果这些是对数据库所做的唯一更改,那么一种方法是启用 二进制日志,并将其用作更改日志。您可以使用 mysqlbinlog 工具将其转换为 SQL 脚本。
If these are the only changes made to your database then one way to do this is to enable the binary log, and use that as your change log. You can convert it to a SQL script using the
mysqlbinlog
tool.