• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 13 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A support group for people who have PII in their mysql databases.

Mysql Anonymous

Contributors can benefit from having real data when they are developing. This script can do a few things (see anonymize.yml):

  • Truncate any tables (logs, and other cruft which may have sensitive data)

  • Nullify fields (emails, passwords, etc)

  • Fill in random/arbitrary data:

    • Random integers
    • Random IP addresses
    • Email addresses
    • Usernames
  • Delete rows based on simple rules: e.g. DELETE FROM mytable WHERE private = "Yes":

    database: tables: mytable: delete: private: Yes

Usage

python anonymize.py > anon.sql
cat anon.sql | mysql