Updated on 2025-11-04 GMT+08:00

Step 1: Add a Database

Database audit supports databases built on ECS, BMS, and RDS on Huawei Cloud. After purchasing a database audit instance, you need to add the database to be audited to the instance.

For details about the types and versions of databases that can be audited by database audit, see Supported Database Types and Versions.

Prerequisites

The database audit instance is in the Running state.

Adding a Database

  1. Log in to the management console.
  2. Select a region, click , and choose Security & Compliance > Database Security Service. The Dashboard page is displayed.
  3. In the navigation tree on the left, choose Databases.
  4. In the Instance drop-down list, select the instance whose database is to be added.
  5. Click Add Database.
  6. In the displayed dialog box, configure the database information.

    Table 1 Agent-free relational databases

    Type

    Supported Edition

    GaussDB for MySQL

    All editions are supported by default.

    RDS for SQLServer

    All editions are supported by default.

    RDS for MySQL

    • 5.6 (5.6.51.1 or later)
    • 5.7 (5.7.29.2 or later)
    • 8.0 (8.0.20.3 or later)

    GaussDB(DWS)

    • 8.2.0.100 or later

    PostgreSQL

    NOTICE:

    If the size of an SQL statement exceeds 4 KB, the SQL statement will be truncated during auditing. As a result, the SQL statement is incomplete.

    • 14 (14.4 or later)
    • 13 (13.6 or later)
    • 12 (12.10 or later)
    • 11 (11.15 or later)
    • 9.6 (9.6.24 or later)
    • 9.5 (9.5.25 or later)

    RDS for MariaDB

    All editions are supported by default.

  7. Click OK. A database whose Audit Status is Disabled is added to the database list.

    Figure 1 Successfully adding a database
    • After adding the database, confirm that the database information is correct. If the database information is incorrect, locate the target database and click Delete in the Operation column, and add the database again.