As of MySQL 8.0.33, components provide access to MySQL Enterprise Data Masking and De-Identification
functionality. Previously, MySQL implemented masking and
de-identification capabilities as a plugin library file
containing a plugin and several loadable functions. Before you
begin the component installation, remove the
data_masking plugin and all of its loadable
functions to avoid conflicts. For instructions, see
Section 8.5.3.1, “MySQL Enterprise Data Masking and De-Identification Plugin Installation”.
MySQL Enterprise Data Masking and De-Identification database table and components are:
masking_dictionariestablePurpose: A table in the
mysqlsystem schema that provides persistent storage of dictionaries and terms.component_maskingcomponentPurpose: The component implements the core of the masking functionality and exposes it as services.
URN:
file://component_maskingcomponent_masking_functionscomponentPurpose: The component exposes all functionality of the
component_maskingcomponent as loadable functions. Some of the functions require theMASKING_DICTIONARIES_ADMINdynamic privilege.URN:
file://component_masking_functions
To set up MySQL Enterprise Data Masking and De-Identification, do the following:
Create the
masking_dictionariestable.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), INDEX dictionary_idx (Dictionary) ) ENGINE = InnoDB DEFAULT CHARSET=utf8mb4;Use the
INSTALL COMPONENTSQL statement to install data masking components.INSTALL COMPONENT 'file://component_masking'; INSTALL COMPONENT 'file://component_masking_functions';If the components and functions are used on a replication source server, install them on all replica servers as well to avoid replication issues. While the components are loaded, information about them is available as described in Section 7.5.2, “Obtaining Component Information”.
To remove MySQL Enterprise Data Masking and De-Identification, do the following:
Use the
UNINSTALL COMPONENTSQL statement to uninstall the data masking components.UNINSTALL COMPONENT 'file://component_masking_functions'; UNINSTALL COMPONENT 'file://component_masking';Drop the
masking_dictionariestable.DROP TABLE mysql.masking_dictionaries;
component_masking_functions installs all of
the related loadable functions automatically. Similarly, the
component when uninstalled also automatically uninstalls those
functions. For general information about installing or
uninstalling components, see
Section 7.5.1, “Installing and Uninstalling Components”.