MySQL审计和一般日志

可以问一下MySQL Audit日志插件和常规日志的区别吗?我正在寻找在MySQL服务器上完成的任何活动.

解决方法:

审计插件

MySQL Enterprise Audit是一项新的安全性和合规性功能.它不包含在开源/社区版中.

As of MySQL 5.6.10, MySQL Enterprise Edition includes MySQL Enterprise
Audit, implemented using a server plugin named audit_log. MySQL
Enterprise Audit uses the open MySQL Audit API to enable standard,
policy-based monitoring and logging of connection and query activity
executed on specific MySQL servers. Designed to meet the Oracle audit
specification, MySQL Enterprise Audit provides an out of box, easy to
use auditing and compliance solution for applications that are
governed by both internal and external regulatory guidelines.

有一个在the manual的更多细节.

顺便说一句,MariaDB有自己的实现Audit Plugin.您可以指定您想要记录的内容.

>连接
>查询
> QUERY_DDL
> QUERY_DML
> QUERY_DCL

常规查询日志

对于DBA和开发人员来说,常规日志是一个非常古老的功能(用于解决问题).通用日志会对性能产生很大影响,并且只能在短时间段内启用.

The general query log is a general record of what mysqld is doing. The
server writes information to this log when clients connect or
disconnect, and it logs each SQL statement received from clients. The
general query log can be very useful when you suspect an error in a
client and want to know exactly what the client sent to mysqld.

更多细节here.

上一篇:linux auditd审计的简单使用和理解


下一篇:mysql – 电子商务订单表.保存价格,还是使用审计/历史表?