检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Scanned Rows Recorded in Slow Query Logs Rows Recorded in the SQL Diagnosis Result Far Less Than the Scanned Rows Recorded in Slow Query Logs Millisecond-Level SQL Statements Recorded in Slow Query Logs Viewing Storage of RDS DB Instances "The table is full" Displayed in Error Logs Audit
Data space: Disk space occupied by user data (including temporary table files and ib_logfile files generated by the database) Binlog: Disk space occupied by binlogs Slow query log: Disk space occupied by slow logs Relay log: Disk space occupied by relay logs Audit log: Disk space
and Log Key Operations Supported by CTS Viewing Tracing Events Enabling the SQL Audit Function Downloading SQL Audit Logs Viewing and Downloading Slow Query Logs Viewing and Downloading Error Logs Database Proxy Introducing Read/Write Splitting Enabling Read/Write Splitting Changing
Feature Description Phase Document 1 RDS for MySQL 8.0 supports SQL audit enablement. After SQL audit is enabled, all SQL operations will be recorded in log files for your further download and query.
Cloud Trace Service (CTS) Records operations on cloud service resources for query, audit, and backtrack. Distributed Database Middleware (DDM) Connects to multiple RDS for MySQL DB instances and allows you to access distributed databases.
*,to_seconds(now())-to_seconds(t.trx_started) idle_time from INFORMATION_SCHEMA.INNODB_TRX t \G; View audit logs or slow query logs to check whether a large amount of data is inserted at a time by a large transaction. Solution Kill the long-running transaction.
You are advised to enable SQL audit in advance so that you can view SQL execution records in audit logs to locate the fault when the CPU usage is high. Solution 1 Analyze slow SQL logs and CPU usage to locate slow queries and then optimize them.
Backup space Backup space is used to store automated backups, manual backups, and SQL audit logs. You can get a free backup space of the same size as your purchased storage space. If the free backup space is used up, the additional space will be billed.
Enabling Database Audit for Post-Event Backtracking The database audit function records all user operations on the database in real time. This function logs, analyzes, and reports user activities in the database.
Audit log Total space occupied by audit logs. Temporary space Total space of the tempdb database. System database Total space of system database msdb. Top 20 Databases You can view details about the top 20 databases by physical file size, including file information.
After the DB instance is connected, run the following command to view slow query log details: select * from ::fn_trace_gettable('D:\SQLTrace\audit\XXX', default) XXX indicates the name of the slow query log recorded in 6.
Enabling Database Audit By using the PostgreSQL Audit extension (pgAudit) with your RDS for PostgreSQL instance, you can capture detailed records that auditors usually need to meet compliance regulations.
You are advised to enable SQL Audit to locate which client deletes the user. Parent topic: SQL Issues
SQL Audit Enable Audit Logging when periodic audits are required. Enable SQL Explorer when SQL analysis is required. Routine O&M Periodically check slow query logs and error logs to identify problems in advance. Periodically check the resource usage of DB instances.
Audit logs The maximum size of an audit log file is 50 MB. Up to 50 audit log files can be displayed. For more information, see Log Management. Naming Table 3 Naming Item Constraints Instance name 4 to 64 characters long Must start with a letter.
log function rds:auditlog:operate N/A Obtaining an audit log list rds:auditlog:list N/A Querying the audit log policy rds:auditlog:list N/A Obtaining the link for downloading an audit log rds:auditlog:download N/A Obtaining a switchover log rds:log:list N/A Creating a database rds
Monitoring and alarms Supported Supported Security group Supported Supported Backup and restoration Supported Supported Parameter settings Supported Supported SSL Supported Supported Log management Supported Supported Read replicas (which need to be created) Supported Supported SQL audit
Security group Supported Supported Backup and restoration Supported Supported Parameter settings Supported Supported SSL Supported Supported Log management Supported Supported Read replicas (which need to be created) Supported Supported Read/write splitting Supported Supported SQL audit
auditlog:list √ √ √ Obtaining audit logs GET /v3/{project_id}/instances/{instance_id}/auditlog?
Audit logs cannot be sent to the Kafka server. Table 2 Operation events Event Source Event Name Event ID Event Severity Description RDS Reset administrator password resetPassword Major The password of the database administrator is reset.