druidfi/mysqldump-php
Pure-PHP MySQL dump library that creates SQL backups without shelling out to mysqldump. It supports tables, views, triggers, compression, and configurable output, making portable database backups easy in Laravel and PHP applications.
SHOW CREATE TABLE / escaping / trigger / view / routine handling. This package already encodes that edge-case knowledge. Unless dumping is your differentiator, owning that code is a tax.WHERE filters make realistic test fixtures and anonymized staging refreshes cheap, which accelerates QA and demo environments.exec() or omit the mysql-client binary. This package makes export work in those environments, which widens the addressable deployment matrix.Adopt when:
WHERE clause / structure-only.--where filters, structure vs. data, compression, views/triggers/routines, output to file or stream.mysqldump, or you don't want a binary in the image.ifsnop/mysqldump-php lineage — pedigree is better than the star count suggests, but the maintenance commitment is still yours.Look elsewhere when:
mydumper, Percona XtraBackup, or native cloud snapshots.To executives: We can ship self-serve data export and pre-migration snapshots this quarter without an infrastructure project. It's a Composer dependency — days of integration, not weeks of engineering — and it works on our managed hosting where we can't call the system mysqldump binary. Two caveats to accept knowingly: the license is GPL-3.0 (safe for internal and hosted use, needs legal sign-off if it ever ships inside a distributed product), and the project is small, so we'll pin a version and own the fork. It does not replace platform backups — RPO/RTO still come from infrastructure snapshots. Recommendation: approve a two-week spike, ship behind an internal DatabaseDumper interface so swapping to native tooling or a managed service later is a one-file change.
To engineering: Pure PHP, Composer-installable, no binary or exec() dependency, configurable via an array or fluent options — table filters, WHERE clauses, structure-only, compression, views/triggers/routines. Wrap it behind our own interface, don't call it directly from controllers; run dumps in a queue worker with a memory and time ceiling. Test the restore path, not just the dump — that's where logical exports actually fail. Watch table size and lock behavior on InnoDB under write load, and set --single-transaction-equivalent options deliberately. Budget for vendoring the fork and pinning minor versions; upstream activity is thin enough that surprise breaks are more likely than surprise wins.
How can I help you explore Laravel packages today?