patternsqlMinor
MySQL audit and general log
Viewed 0 times
logauditgeneralmysqland
Problem
May ask for the difference of MySQL Audit log plugin and general log? I looking for any activities done in a MySQL server.
Solution
Audit Plugin
MySQL Enterprise Audit is a new feature for security and compliance. It's not included in the Open Source / Community edition.
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.
have a look at the manual for more details.
By the way, MariaDB has its own implementation Audit Plugin. You can specify what exactly you wish to log.
General Query Log
The general log is a quite old feature for the DBA and developer (to troubleshoot issues). The general log has a big performance impact and should be only enabled during short time slots.
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.
more details here.
MySQL Enterprise Audit is a new feature for security and compliance. It's not included in the Open Source / Community edition.
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.
have a look at the manual for more details.
By the way, MariaDB has its own implementation Audit Plugin. You can specify what exactly you wish to log.
- CONNECT
- QUERY
- QUERY_DDL
- QUERY_DML
- QUERY_DCL
General Query Log
The general log is a quite old feature for the DBA and developer (to troubleshoot issues). The general log has a big performance impact and should be only enabled during short time slots.
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.
more details here.
Context
StackExchange Database Administrators Q#178213, answer score: 8
Revisions (0)
No revisions yet.