PHPackages                             payu/mysql-dump-anonymizer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. payu/mysql-dump-anonymizer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

payu/mysql-dump-anonymizer
==========================

Anonymizer for MySQL dumps. Can be used standalone or as a library.

v0.3.0(2mo ago)5943[1 issues](https://github.com/PayU/mysql-dump-anonymizer/issues)Apache-2.0PHPPHP ^7.4 || ^8.0CI passing

Since Apr 21Pushed 2mo ago13 watchersCompare

[ Source](https://github.com/PayU/mysql-dump-anonymizer)[ Packagist](https://packagist.org/packages/payu/mysql-dump-anonymizer)[ RSS](/packages/payu-mysql-dump-anonymizer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (25)Used By (0)

[![Build Status](https://camo.githubusercontent.com/0c34c59c216b77304c6626ba2f0cd0028d965a85257a4828ed8ba566fbbab578/68747470733a2f2f7472617669732d63692e636f6d2f506179552f6d7973716c2d64756d702d616e6f6e796d697a65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/PayU/mysql-dump-anonymizer)

Work In Progress

This library handles parsing of a mysql dump file and anonymizing it using data types and rules mysql dump must be exported using:

- --skip-add-drop-table
- --skip-add-locks
- --skip-comments
- --skip-disable-keys
- --skip-set-charset
- --compact (all 5 above)
- --complete-insert
- --hex-blob
- --extended-insert (default on)

Optional for speed:

- --quick (default on, for faster export)
- --innodb-optimize-keys (for faster import)

Optional for consistency

- --skip-lock-tables
- --single-transaction (automatically enables the above one)
- --lock-for-backup (percona specific)

Basically the command will look like:

`mysqldump --complete-insert --hex-blob --innodb-optimize-keys --single-transaction --lock-for-backup `and the output of it can be directly passed to anonymizer.

When using --compact dump file will not have @@SQL\_MODE setting of the source server. When dealing with options like STRICT\_TRANS\_TABLES / NO\_ZERO\_IN\_DATE this can be a problem.

Check the system variables `net_buffer_length` and `max-allowed-packet` on the destination server to be at least the same amount as on the source server.

- [https://dev.mysql.com/doc/refman/5.6/en/mysqldump.html#option\_mysqldump\_net-buffer-length](https://dev.mysql.com/doc/refman/5.6/en/mysqldump.html#option_mysqldump_net-buffer-length)

Or pass the sql file at input and at output:

`php bin/mysql-dump-anonymize.php --config=FILENAME databse-dump-anonymized.sql`

```
Usage: mysqldump [options]  | php mysql-dump-anonymize.php --config=FILENAME [OPTIONS] | mysql [options] -D

mysql-dump-anonymize.php options:
 --config-type          Default Value: yaml
                        Specifies the type of the config used.

 --line-parser          Default Value: mysqldump
                        Specifies the type of the line parser used.

 --dump-size            When available, specify the length of the data being anonymized.
                        This will be used to show progress data at runtime.

 --show-progress        Default value: 1
                        Set to 0 to not show progress data.

 --salt                 Default value: md5(microtime())
                        Specifies the hashing salt value at runtime.

```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance79

Regular maintenance activity

Popularity18

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 53.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~469 days

Total

3

Last Release

89d ago

PHP version history (3 changes)v0.1.1PHP ^7.4

v0.2.0PHP ^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0

v0.3.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8714fa223d32c91d96ba5aededaea9dba9b395eb7574732e5964c280d2b5efaf?d=identicon)[drealecs](/maintainers/drealecs)

![](https://www.gravatar.com/avatar/05024869c39d99af5d46130f2338be684f8a3d83ef536f8e57d37b60f4362122?d=identicon)[trydocatch](/maintainers/trydocatch)

![](https://www.gravatar.com/avatar/d89ad747dc75223cae31ac35f27ff22d24a519363bdb2c88d5a5db3da88b6495?d=identicon)[foaieee](/maintainers/foaieee)

---

Top Contributors

[![alexconrad](https://avatars.githubusercontent.com/u/4181562?v=4)](https://github.com/alexconrad "alexconrad (101 commits)")[![drealecs](https://avatars.githubusercontent.com/u/209984?v=4)](https://github.com/drealecs "drealecs (46 commits)")[![DiiaanaD](https://avatars.githubusercontent.com/u/26691801?v=4)](https://github.com/DiiaanaD "DiiaanaD (21 commits)")[![beniamin-gheorghita-payu-gpo](https://avatars.githubusercontent.com/u/172390245?v=4)](https://github.com/beniamin-gheorghita-payu-gpo "beniamin-gheorghita-payu-gpo (7 commits)")[![foaieee](https://avatars.githubusercontent.com/u/45826035?v=4)](https://github.com/foaieee "foaieee (4 commits)")[![itrack](https://avatars.githubusercontent.com/u/2368391?v=4)](https://github.com/itrack "itrack (3 commits)")[![benigheorghita](https://avatars.githubusercontent.com/u/8132192?v=4)](https://github.com/benigheorghita "benigheorghita (2 commits)")[![galfit82](https://avatars.githubusercontent.com/u/85100357?v=4)](https://github.com/galfit82 "galfit82 (1 commits)")[![catalinizina](https://avatars.githubusercontent.com/u/33549838?v=4)](https://github.com/catalinizina "catalinizina (1 commits)")[![mariasophh](https://avatars.githubusercontent.com/u/38437094?v=4)](https://github.com/mariasophh "mariasophh (1 commits)")[![trydocatch](https://avatars.githubusercontent.com/u/5352167?v=4)](https://github.com/trydocatch "trydocatch (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/payu-mysql-dump-anonymizer/health.svg)

```
[![Health](https://phpackages.com/badges/payu-mysql-dump-anonymizer/health.svg)](https://phpackages.com/packages/payu-mysql-dump-anonymizer)
```

###  Alternatives

[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
