PHPackages                             dg/mysql-dump - 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. [Database &amp; ORM](/categories/database)
4. /
5. dg/mysql-dump

ActiveLibrary[Database &amp; ORM](/categories/database)

dg/mysql-dump
=============

MySQL database dump.

v1.6.0(1y ago)2103.0M↑29.1%48[3 PRs](https://github.com/dg/MySQL-dump/pulls)9BSD-3-ClausePHPPHP &gt;=7.1

Since Aug 31Pushed 1y ago13 watchersCompare

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

READMEChangelogDependenciesVersions (10)Used By (9)

MySQL Dump Utility
==================

[](#mysql-dump-utility)

This is a backup utility used to dump a database for backup or transfer to another MySQL server. The dump typically contains SQL statements to create the table, populate it, or both.

It requires PHP 5.6 (release 1.5) or PHP 7.1 or later.

Usage
-----

[](#usage)

Create [MySQLi](http://www.php.net/manual/en/mysqli.construct.php) object and pass it to the MySQLDump:

```
$db = new mysqli('localhost', 'root', 'password', 'database');
$dump = new MySQLDump($db);
```

You can optionally specify how each table or view should be exported:

```
$dump->tables['search_cache'] = MySQLDump::DROP | MySQLDump::CREATE;
$dump->tables['log'] = MySQLDump::NONE;
```

Then simply call `save()` or `write()`:

```
$dump->save('export.sql.gz');
```

Import dump from file to database this way:

```
$import = new MySQLImport($db);
$import->load('dump.sql.gz');
```

If you like it, **[please make a donation now](https://nette.org/make-donation?to=mysql-dump)**. Thank you!

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity59

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 74.3% 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 ~549 days

Recently: every ~859 days

Total

9

Last Release

609d ago

PHP version history (2 changes)v1.5.0PHP &gt;=5.6

v1.6.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/17f266513a3ca97500ec3d85d562b9279c7a6346358fe2b8d90390ece717a027?d=identicon)[david@grudl.com](/maintainers/david@grudl.com)

---

Top Contributors

[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (26 commits)")[![JanTvrdik](https://avatars.githubusercontent.com/u/175109?v=4)](https://github.com/JanTvrdik "JanTvrdik (7 commits)")[![jakubvokoun](https://avatars.githubusercontent.com/u/14090004?v=4)](https://github.com/jakubvokoun "jakubvokoun (1 commits)")[![VaclavSir](https://avatars.githubusercontent.com/u/1473642?v=4)](https://github.com/VaclavSir "VaclavSir (1 commits)")

---

Tags

backupmysql-dump-utilityphpmysql

### Embed Badge

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

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

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k578.4M5.6k](/packages/doctrine-dbal)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k25.2M34](/packages/kirschbaum-development-eloquent-power-joins)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M36](/packages/scienta-doctrine-json-functions)[cytopia/mysqldump-secure

Secure mysqldump script with encryption, compression, logging, blacklisting and Nagios monitoring integration

1474.7k1](/packages/cytopia-mysqldump-secure)[ark/database

Light weight database abstraction

117.8k](/packages/ark-database)

PHPackages © 2026

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