tencent cloud

TencentDB for MySQL

소식 및 공지 사항
제품 동향
신규 사용자 가이드
제품 소개
제품 개요
제품 장점
응용 시나리오
데이터베이스 아키텍처
격리 정책
제품 기능 목록
데이터베이스 인스턴스
고가용성(멀티 가용존)
리전 및 가용존
자체개발 커널
TXSQL 커널 개요
기능적 특성
성능적 특성
보안적 특성
안정적 특성
구매 가이드
과금 개요
구매 방법
연장 안내
연체 안내
환불 안내
인스턴스 비용 조정 설명
백업 공간 과금 안내
시작하기
시작 개요
MySQL 인스턴스 생성
운영 가이드
사용 제한
운영 개요
인스턴스의 점검 관리
인스턴스 프로모션
인스턴스 확장
데이터베이스 프록시
데이터베이스 관리(DMC)
계정 관리
매개변수 설정
백업과 롤백
데이터 마이그레이션
네트워크 및 보안
모니터링 및 알람
로그 센터
태그
사례 튜토리얼
TencentDB for MySQL의 사용 규범
애플리케이션 구성 자동 재연결
MySQL 마스터 인스턴스 매개변수 수정의 영향
MyISAM에서 InnoDB로의 자동 변환 제한
TencentDB for MySQL을 위한 VPC 생성
TencentDB for MySQL를 통해 비즈니스 부하 능력 향상
2리전 3데이터센터 재해 복구 아키텍처 구축
읽기/쓰기 분리로 TencentDB for MySQL 성능 향상
DTS를 사용하여 InnoDB에서 RocksDB로 데이터 마이그레이션
웹 애플리케이션을 위한 LAMP 스택 구축
Drupal 웹사이트 구축
Python을 통해 MySQL API 사용
백서
성능 백서
보안 백서
장애 처리
연결 관련
성능 관련
인스턴스 데이터 동기화 딜레이
케이스 인센시티브 설정 실패
API문서
History
Introduction
API Category
Instance APIs
Making API Requests
Data Import APIs
Database Proxy APIs
Database Audit APIs
Security APIs
Task APIs
Backup APIs
Account APIs
Rollback APIs
Parameter APIs
Database APIs
Monitoring APIs
Log-related API
Data Types
Error Codes
FAQs
과금 관련
백업 관련
롤백 관련
로그인
매개변수 수정
업그레이드 관련
계정 권한
성능 메모리
유지보수 관련 FAQ
데이터 마이그레이션
기능 특징
콘솔 관련
로그 관련
API 2.0에서 3.0으로 전환 가이드
Service Agreement
Service Level Agreement
Terms of Service
범용 참고
표준 및 인증
고객센터
용어집
ドキュメントTencentDB for MySQL

Enabling Audit Service

フォーカスモード
フォントサイズ
最終更新日: 2025-11-28 18:13:26
Tencent Cloud provides database audit capabilities for TencentDB for MySQL, which can record accesses to databases and executions of SQL statements to help you manage risks and improve the database security.

Prerequisite

You have created a MySQL instance. For more information, see Creating MySQL Instance.

Supported Versions and Architectures

Database audit currently supports database kernel versions MySQL 5.6 20180122 and later versions, MySQL 5.7 20190429 and later versions, and MySQL 8.0 20210330 and later versions.
The supported instance architectures include two-node, three-node, and Cluster Edition. Read-only instances are also supported for database audit.
TencentDB for MySQL 5.5 instances, TencentDB for MySQL single-node (cloud disk) instances, the read-only analysis engine, and two-node economical instances do not support database audit.

Directions

1. Log in to the TencentDB for MySQL console.
2. On the left sidebar, click Database Audit.
3. Select a region at the top, click the Audit Log Storage Status field on the Audit Instance page, and select Disabled to filter instances with the audit service disabled.
4. Find the target instance in the audit instance list, or search for it by resource attribute in the search box, and click Enable Database Audit in the Operation column.
Note:
You can batch enable the audit service for multiple target instances by selecting them in the audit instance list and clicking Enable Database Audit above the list.

5. On the page for enabling the audit service, sequentially complete the audit instance selection, audit type settings, audit service settings, and advanced performance analysis settings. Read and check the Tencent Cloud Service Agreement, then click OK.
5.1 Audit instance selection In the Select Audit Instance section, all instances selected in step 4 are selected by default. You can select other or more target instances in this window or search for target instances by instance ID/name in the search box. Then, set the audit rule.

5.2 Audit rule settings In the Audit Rule Settings section, select Full Audit or Rule-Based Audit. Their differences are as detailed below:
Parameter
Description
Full audit
Full audit records all database accesses and SQL statement executions.
Rule-based audit
Rule auditing will chronicle the access to the database and the execution of SQL statements, in accordance with the bespoke audit rules.

When the audit type is set to full audit
, there are two actual operational scenarios in the console, for which you may refer to the corresponding procedures.
Choose from existing rule templates or decide to create a new rule template. For detailed steps on creating a new template, please refer to Creating Rule Templates.
After completing the rule template configuration, proceed to the Audit Service Configuration step.
Note:
You may apply up to five rule templates, and the relationship between different rule templates is of 'or' nature.
The rule templates are intended for instances with 'Full Audit' type, serving the sole purpose of assigning risk levels and alert policies to audit logs that match the rules of the template. The audit logs that do not match the rules will still be preserved.
If you select Rule-Based Audit, you need to select Create rule or Select from rule templates. If you select an existing rule from rule templates, you can directly configure audit. If there are no appropriate rule templates, you can create a new one, refresh the page, and select it. For detailed directions, see Creating Rule Template.
Note:
You may apply up to five rule templates, with the relationship between different rule templates being "or".
Rule templates are targeted at instances with the audit type of "rule audit". They are used for retaining audit logs that hit the template rules, setting risk levels, and establishing alarm strategies. Audit logs that do not hit the rule content are no longer retained.
5.3 
Audit service settings
In the Configure Audit section, set Log Retention Period, Frequent Access Storage Period, and Infrequent Access Storage Period, read and indicate your content to the Tencent Cloud Terms of Service, and click OK.

Parameter
Description
Log Retention Period
The audit log retention period in days, which can be 7, 30, 90, 180, 365, 1,095, or 1,825 days.
Frequent Access Storage Period
Frequent access storage has the best query performance as it uses ultra-high-performance storage media. Audit data is initially stored in frequent access storage for the time period specified here, after which it is automatically transitioned to infrequent access storage. These two storage types only differ in performance but both support auditing. For example, if the log retention period is set to 30 days, and frequent access storage period is set to 7 days, then the infrequent access storage period will be 23 days by default.
5.4 Advanced performance analysis
SQL Analysis: TencentDB for DBbrain provides comprehensive capabilities for locating and analyzing database issues based on the database audit. It supports the localization of abnormal SQL queries, SQL template aggregation statistics, and multi-dimensional performance comparison. This option is enabled by default and can be manually disabled. Once the option is disabled, the SQL analysis capability is disabled.
Note:
The SQL analysis feature is currently in open beta and is available for a free trial. Once the beta phase concludes, TencentDB for DBbrain will officially introduce a commercial billing plan. You can refer to the official announcement for specific pricing details at that time. For more details about SQL analysis, see SQL Analysis (MySQL).

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック