MySQL audit plug-in installation instructions-Upgrade

Source: Internet
Author: User
Based on the mysql audit plug-in designed and developed previously and the content of the MySQL audit plug-in installation instructions document, this article provides a complete description of the mysql audit plug-in.

Based on the mysql audit plug-in designed and developed previously and the content of the MySQL audit plug-in installation instructions document, this article provides a complete description of the mysql audit plug-in.

Purpose

Based on the mysql audit plug-in designed and developed previously and the content of the MySQL audit plug-in installation instructions document, this article provides a complete description of the mysql audit plug-in. This section describes the newly added content in detail to further improve the audit plug-in function.

New Content

The MySQL audit plug-in is further developed and improved in view of the shortcomings in the previous versions and incomplete functions. The new content mainly includes:

1. added the audit database and data table functions.

This function is not implemented in earlier versions. In the current version, the audit_dbs and audit_tables in the Audit options are implemented. It can audit certain databases or certain data tables, which is helpful for special applications of different application systems. In this way, we can further refine and customize the audit content in concert with the audit granularity.

2. added the function of ignoring audit users, databases, and data tables.

In view of the particularity of audit applications, add neglected audit users, databases, and data tables. You can ignore Operation Records of one or more users, ignore Operation Records of one or more databases, and ignore operation records of a table. In this way, when the audit content is large and some unnecessary audit content needs to be removed from the audit, these parameters can effectively simplify the audit option configuration.

Added configuration file options:

Option

Function

Ignore_users

Ignored users

Ignore_dbs

Ignored Database

Ignore_tables

Ignored data table

The setting format of the option is described in the configuration file, such as audit_users, audit_dbs, and audit_tables.

When an audit user, database, or data table that is ignored conflicts with the Audit object is added, the priority of the Audit object is ignored. Example: audit_dbs = important, audit_tables = test. test, ignore_dbs = test, ignore_tables = important. test, the audit content will first ignore important. audit all operations on the test table. all operations on the test data table, and then all operations on the test database are ignored to audit the operations on important data.

3. Add database information for audit operations.

Because the SQL statements operated on do not directly write to the database, the SQL statements alone cannot effectively identify the database to operate on. If different databases have the same data table, Database Audit cannot effectively track the audit content. Adding database information can effectively improve the content of SQL audit.

File output format

There are two file formats: Connection audit and Operation Audit.

1. Connection audit

The format of the connection-related audit log information is as follows.

Specific:

[15:40:39]: audit time.

[CONNECT]: the connection type;

Status: the status of connection success (0) or failure (error code;

User: the connection user name;

External-user: an external connection user, which is valid when using middleware or proxy services;

Proxy-user: the user name of the proxy service;

Host: indicates the connection host name;

Ip: connected ip address;

Database: name of the connected database.

[15:40:39] [CONNECT] status: #; thread_id: #; user: XXX; external-user: XXX; proxy-user: XXX; host: XXX; ip: ###. ###. ###. ###; database: XXX

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.