简体   繁体   English

如何监视MYSQL更改

[英]How to Monitor MYSQL changes

I have installed The AIDE on my Ubuntu server and I would like now to Monitor MYSQL changes (new fields, new content, new tables etc. created). 我已经在Ubuntu服务器上安装了The AIDE ,现在我想监视MYSQL更改(创建新字段,新内容,新表等)。 How can I do this with AIDE? 如何使用AIDE做到这一点?

Thanks! 谢谢! Roman 罗马

Unless there is a special library (framework or app) I can't see a way for you to do this using AIDE. 除非有一个特殊的库(框架或应用程序),否则我看不到使用AIDE进行此操作的方法。 AIDE would better serve to monitor configuration files, and instead daily dumps of the actual SQL on an offsite server (that also supports versioning). AIDE最好用来监视配置文件,而不是每天在非现场服务器(也支持版本控制)上转储实际SQL。

Requirement: I would like now to Monitor MYSQL changes (new fields, new content, new tables etc. created). 要求:我现在想监视MYSQL更改(创建新字段,新内容,新表等)。

From here there is a description of what AIDE does: 这里开始 ,介绍了AIDE的功能:

"It is a host-based intrusion detection system (HIDS) for checking the integrity of files. It does this by creating a baseline database of files on an initial run, and then checks this database against the system on subsequent runs. File properties that can be checked against include inode, permissions, modification time, file contents, etc." “这是一个基于主机的入侵检测系统(HIDS),用于检查文件的完整性。它是通过在初始运行时创建文件的基准数据库来完成的,然后在后续运行时针对系统检查该数据库。文件属性可以根据inode,权限,修改时间,文件内容等进行检查。”

Monitoring Changes in Table Content: 监视表内容的更改:

Unless there is a tool to perform parsing based on diffs (between two different binary files), it will not be that easy to understand changes related to new fields, and new content. 除非有一个基于差异(在两个不同的二进制文件之间)进行解析的工具,否则将很难理解与新字段和新内容相关的更改。

Therefore I would propose an hourly (or daily) mysql dump of your data within a git folder (which provides versioning) and preferebly on a secure offsite server. 因此,我建议每小时(或每天)对git文件夹(提供版本控制)中的数据进行mysql转储,最好在安全的异地服务器上进行。

Monitoring Addition of Tables 监视表的添加

If you wish to detect the addition of new tables, it will be as simple as monitoring the creation of underlying Database files. 如果您希望检测新表的添加,则就像监视基础数据库文件的创建一样简单。 For example, the IMAP engine creates 3 different underlying files one of these being MYD. 例如,IMAP引擎创建3个不同的基础文件,其中之一是MYD。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM