Skip to content

Install the data masking component

Percona Server for MySQL 8.0.34 adds the data masking component. Percona Server for MySQL also has the Data Masking plugin.

Before installing the component, you must uninstall the data masking plugin and all of the functions. The removal avoids conflicts.

The component has the following parts:

  • A database server system table used to store the terms and dictionaries
  • A component_masking_functions component that contains the loadable functions

The MASKING_DICTIONARIES_ADMIN privilege may be required by some functions.

Install the component

The following steps install the component:

  1. Create masking_dictionaries.

    mysql> CREATE TABLE IF NOT EXISTS
    mysql.masking_dictionaries(
        Dictionary VARCHAR(256) NOT NULL,
        Term VARCHAR(256) NOT NULL,
        UNIQUE INDEX dictionary_term_idx (Dictionary, Term)
    ) ENGINE = InnoDB DEFAULT CHARSET=utf8mb4;
    
  2. Install the data masking components and the loadable functions.

    mysql> INSTALL COMPONENT 'file://component_masking_functions';
    
  3. The MASKING_DICTIONARIES_ADMIN is required to use the the following functions:

    • masking_dictionary_term_add

    • masking_dictionary_term_remove

    • masking_dictionary_remove

      mysql> GRANT MASKING_DICTIONARIES_ADMIN ON *.* TO <user>;
      

Uninstall the data masking component

Data masking component functions

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.


Last update: 2023-09-26