Customize system database filtering

更新时间:
复制 MD 格式

This topic describes how to customize system database filtering for an instance in DMS using security rules.

Background

After you add an instance to DMS, the service automatically collects metadata from its databases. To protect system databases, reduce visual clutter, or hide databases that contain sensitive business data, you can configure DMS to filter specific system databases, such as the MySQL information_schema database. After you apply a filter, DMS stops collecting metadata for the specified databases, making them no longer visible or searchable in DMS.

Note

For PostgreSQL instances, this filtering applies to a schema instead of an entire database.

Prerequisites

The instance is managed in Security Collaboration mode.

Notes

When you enable the filter system databases switch, DMS filters the system databases that you specify. If you disable the switch, DMS does not filter any system databases by default.

Procedure

  1. Log in to DMS 5.0.

  2. Move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner and choose All Features > Security and disaster recovery (DBS) > Security Rules.

    Note

    If you use the DMS console in normal mode, choose Security and disaster recovery (DBS) > Security Rules in the top navigation bar.

  3. Find the target rule set and click Edit in the Actions column.

  4. In the navigation pane on the left, click Others>Metadata Synchronization.

  5. Find the Filter System Database Configurations rule and click Edit.

  6. In the Edit Configuration Item panel, enable the Filter System Databases switch.

  7. Specify the system databases to filter. You can use the following methods:

    • Enter the full names of databases

      In the Databases to Filter list, enter the full names of the databases to filter.

    • Use a regular expression to match databases

      In the Regex to Filter Databases field, enter a regular expression. For example, test_\w+ filters all system databases whose names start with test_.

      Note

      You can use both the database list and regular expression options at the same time.

  8. Click Submit.

  9. Apply the filter settings. You can apply the settings manually or wait for them to be applied automatically.

    • Manually apply the settings

      1. In the navigation pane on the left, click Database Instances and find the target instance.

      2. Right-click the instance name and select Refresh/Sync Dictionary.

    • Automatically apply the settings

      DMS synchronizes metadata every day at 18:00:00.

Related documentation

System databases blocked by DMS by default