Updated on 2023-09-14 GMT+08:00

Audit and Logs

Audit

Cloud Trace Service (CTS) records operations on the cloud resources in your account. You can use the logs generated by CTS to perform security analysis, track resource changes, audit compliance, and locate faults.

For details about how to enable and configure CTS, see Enabling CTS.

With CTS, you can record operations associated with GaussDB(for MySQL) for later query, audit, and backtrack operations.

Logs

GaussDB(for MySQL) provides a variety of log types and functions for database analysis or audit. You can view logs on the management console.

  • Error logs

    GaussDB(for MySQL) allows you to view database-level logs, including error logs and slow SQL query logs.

  • Slow query logs

    Slow query logs record statements that exceed long_query_time (10 seconds by default). You can view log details and statistics to identify slow statements, so you can optimize them.

  • SQL Explorer

    Enabling SQL Explorer will allow GaussDB(for MySQL) to store all SQL statement logs for analysis.

    SQL Explorer is disabled by default.

    If SQL Explorer is enabled, you can use DAS to view average execution duration, total execution duration, average lock wait time, average rows scanned, and the like.