# ifsnop/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

Repository: https://github.com/ifsnop/mysqldump-php
Canonical: https://ross.abutalabs.com/products/mysqldump-php
Homepage: https://github.com/ifsnop/mysqldump-php
Language: PHP
License: GPL-3.0
License Family: copyleft
Topics: mysql, mysqldump, pdo, php7, php5, database, php, sql, hhvm, mariadb, mysql-backup, windows, linux, macos
Last push: 2026-08-02T19:42:25+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 67, longevity 100
- inputs: {"age_days": 4988, "days_push": 31, "days_rel": 8, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1286, forks 291 (observed 2026-08-28T04:04:14.850860+00:00)

## What it is
A pure PHP reimplementation of the mysqldump command-line tool for backing up MySQL and MariaDB databases via PDO, with no external dependencies. It dumps table structures, data, views, triggers, stored routines, and events with output compression, and can also restore dumps when no mysql executable is available.

## Use cases
- backup a mysql database from php without shell access
- dump mysql or mariadb schema and data to a sql file in php
- mysqldump alternative when the mysql cli is not installed
- restore a sql dump file from php code
- create scheduled database backups in a php application
- export database dumps compressed as gzip or upload to cloud storage

## When to choose
- You need to back up or restore MySQL/MariaDB entirely from PHP, e.g. on shared hosting without shell access or the mysql binary
- You want mysqldump-compatible output with extras like hex-encoded blobs, resolved view dependencies, stored routines, events, and on-the-fly data hooks
- You want a zero-dependency Composer package with gzip compression and sane defaults

## When to avoid
- You have shell access and can use the native mysqldump binary, which is faster and more feature-complete
- You need to back up non-MySQL databases such as PostgreSQL or SQLite
- You need to dump extremely large databases where native tooling performance matters

## Facets
- artifact type: library
- maturity: stable
- function: backup, database, compression
- domain: databases, developer-tools
- platform: php, windows, cross-platform
- tags: mysql, mysqldump, mariadb, pdo, sql, database-backup, dump-restore, php-library, no-dependencies, linux, macos

## Member repositories
- ifsnop/mysqldump-php (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:14.850860+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:56:35.106636+00:00, confidence not recorded.
  - readme: https://github.com/ifsnop/mysqldump-php (fetched 2026-08-28T04:04:14.850860+00:00, sha 31cdb96ab777)
  - homepage: https://github.com/ifsnop/mysqldump-php (fetched 2026-08-29T12:12:04.814521+00:00, sha c7d3316ed854)
- Data as of 2026-08-30T08:39:29.467469+00:00.
