mysql-data-masking

Mask sensitive data in Percona Server for MySQL using mask_* and gen_* functions.

1|1|Updated May 29, 2026
One-click install
npx skills add https://github.com/Percona-Lab/skills --skill mysql-data-masking
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mysql-data-masking
Source: https://github.com/Percona-Lab/skills/tree/main/mysql-data-masking
Command: npx skills add https://github.com/Percona-Lab/skills --skill mysql-data-masking

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mask sensitive data in Percona Server for MySQL by providing mask_* and gen_* functions that transform output without altering stored data.

Core Features & Use Cases

  • Mask existing values and generate synthetic data via mask_* and gen_* functions in SQL queries, views, or routines.
  • Manage masking dictionaries with helper functions like masking_dictionary_term_add/remove, gen_dictionary, gen_blocklist.
  • Installation sequence including creating dictionary table, installing component, granting, and notes about tech preview; usage with examples.

Quick Start

Create the dictionary table, install the masking component, grant necessary privileges, then start masking by calling mask_* or gen_* in your queries.

Frequently Asked Questions about mysql-data-masking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I mask PII in MySQL without altering the stored data?▼

To mask PII in MySQL without altering stored data, use mask_* and gen_* functions that transform query output on the fly. This ensures sensitive information remains secure in tables while views and reports display compliance-safe results.

What is the process to generate synthetic data in Percona Server for MySQL?▼

Generating synthetic data in Percona Server for MySQL involves installing the masking component, creating the dictionary table, and calling gen_* functions in SQL queries. This produces realistic test data for development and non-production environments.

Do I need to create a dictionary table before using data masking functions in MySQL?▼

Yes, you must create the dictionary table first, then install the masking component and apply correct grants. The functions operate on the mysql.masking_dictionaries dictionary, managed via dictionary-admin calls to add or remove terms.

Can I manage masking dictionaries directly within SQL queries?▼

Yes, you can manage masking dictionaries directly using helper functions like masking_dictionary_term_add, masking_dictionary_term_remove, gen_dictionary, and gen_blocklist. These maintain custom terms and blocklists for data masking operations.

Does data masking in Percona Server for MySQL work with views and routines?▼

Data masking in Percona Server for MySQL works with queries, views, and routines by applying mask_* and gen_* functions. It transforms output without altering stored data, delivering compliance-safe results across non-production environments.

Are there any limitations when using data masking in MySQL for development environments?▼

Data masking in MySQL is a tech preview feature, so users should anticipate potential changes. It is designed for development, testing, and non-production environments where realistic test data or compliance-safe results are required.