AnalyticDB for MySQL provides the SQL audit feature to log data manipulation language (DML) and data definition language (DDL) operations that are executed against databases. You can retrieve database operation information. This improves the security of AnalyticDB for MySQL databases.

Pricing

The SQL audit feature is free in public preview from June 1, 2020 to August 31, 2020. After public preview ends, AnalyticDB for MySQL reserves your audit logs of the last month for free. You are charged for the storage of the audit logs that are generated one month ago. For more information about pricing, go to the pricing page.

Features

  • SQL audit logging

    SQL audit logging records all operations that are performed on databases. You can use audit logs to identify faults, analyze database activities, and audit databases for security purposes.

  • Data search

    You can search data by combining multiple conditions, such as database, client IP, execution duration, and execution status. You can also export search results.

Enable SQL audit

  1. Log on to the AnalyticDB for MySQL console.
  2. In the upper-left corner of the page, select the region where clusters reside.
  3. In the left-side navigation pane, click Clusters.
  4. On the V3.0 Clusters tab, click the target Cluster ID.
  5. In the left-side navigation pane, click Data Security.
  6. On the Data Security page, click the SQL Audit tab, and then click Enable SQL Audit.
  7. In the SQL Audit Configuration dialog box, click Yes to enable SQL audit.

Export SQL audit logs

  1. Log on to the AnalyticDB for MySQL console.
  2. In the upper-left corner of the page, select the region where clusters reside.
  3. In the left-side navigation pane, click Clusters.
  4. On the V3.0 Clusters tab, click the target Cluster ID.
  5. In the left-side navigation pane, click Data Security.
  6. On the Data Security page, click the SQL Audit tab.
  7. Click Query. The SQL audit content appears. Click Export Current Page to export the audit log to an Excel file.

Disable SQL audit

Note After SQL audit is disabled, SQL audit logs are deleted. Export SQL audit logs before you disable SQL audit.
  1. Log on to the AnalyticDB for MySQL console.
  2. In the upper-left corner of the page, select the region where clusters reside.
  3. In the left-side navigation pane, click Clusters.
  4. On the V3.0 Clusters tab, click the target Cluster ID.
  5. In the left-side navigation pane, click Data Security.
  6. On the Data Security page, click the SQL Audit tab, and then click Audit Configuration.
  7. In the SQL Audit Configuration dialog box, select No to disable SQL audit.