3

May ask for the difference of MySQL Audit log plugin and general log? I looking for any activities done in a MySQL server.

3

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 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.

  • Thank you for the simple but informative comparison of two. – Darwin Cabiling Jul 13 '17 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.