PHPackages                             lucasbustamante/mysqldump-php - 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. lucasbustamante/mysqldump-php

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

lucasbustamante/mysqldump-php
=============================

A fork of https://github.com/ifsnop/mysqldump-php, a PHP implementation of mysqldump.

v2.9.6(5y ago)0311GPL-3.0-or-laterPHPPHP &gt;=5.3.0

Since Nov 21Pushed 5y agoCompare

[ Source](https://github.com/Luc45/mysqldump-php)[ Packagist](https://packagist.org/packages/lucasbustamante/mysqldump-php)[ Docs](https://github.com/ifsnop/mysqldump-php)[ RSS](/packages/lucasbustamante-mysqldump-php/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (2)Versions (28)Used By (1)

MySQLDump - PHP
===============

[](#mysqldump---php)

[Requirements](https://github.com/ifsnop/mysqldump-php#requirements) | [Installing](https://github.com/ifsnop/mysqldump-php#installing) | [Getting started](https://github.com/ifsnop/mysqldump-php#getting-started) | [API](https://github.com/ifsnop/mysqldump-php#constructor-and-default-parameters) | [Settings](https://github.com/ifsnop/mysqldump-php#dump-settings) | [PDO Settings](https://github.com/ifsnop/mysqldump-php#pdo-settings) | [TODO](https://github.com/ifsnop/mysqldump-php#todo) | [License](https://github.com/ifsnop/mysqldump-php#license) | [Credits](https://github.com/ifsnop/mysqldump-php#credits)

[![Build Status](https://camo.githubusercontent.com/383eacb56e2618c25be8a0e82f55b04906e7cbd5fce2f62df365dbcda3efedec/68747470733a2f2f7472617669732d63692e6f72672f6966736e6f702f6d7973716c64756d702d7068702e7376673f6272616e63683d646576656c)](https://travis-ci.org/ifsnop/mysqldump-php)[![Total Downloads](https://camo.githubusercontent.com/56dc55804f1319251ec978fbbeeeaa95dbe7dd83adea5c2d5e9f6eea34b53015/68747470733a2f2f706f7365722e707567782e6f72672f6966736e6f702f6d7973716c64756d702d7068702f646f776e6c6f616473)](https://packagist.org/packages/ifsnop/mysqldump-php)[![Monthly Downloads](https://camo.githubusercontent.com/a62d3bd263965fb51cc1c53226c849f12267dc6025a2eaa76b8e49be98ae5af0/68747470733a2f2f706f7365722e707567782e6f72672f6966736e6f702f6d7973716c64756d702d7068702f642f6d6f6e74686c79)](https://packagist.org/packages/ifsnop/mysqldump-php)[![Daily Downloads](https://camo.githubusercontent.com/469900131be6c55750178aeb5d28d6cd66a8d83fceef4af17b06a3b0877185d6/68747470733a2f2f706f7365722e707567782e6f72672f6966736e6f702f6d7973716c64756d702d7068702f642f6461696c79)](https://packagist.org/packages/ifsnop/mysqldump-php)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/b22e30e46490d31c917f28aa25e91c62197a94fff448211dabc217c5e84454d3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6966736e6f702f6d7973716c64756d702d7068702f6261646765732f7175616c6974792d73636f72652e706e673f733d64303238393165313936613363613132393836313930333261353338636538616538636166643262)](https://scrutinizer-ci.com/g/ifsnop/mysqldump-php/)[![Latest Stable Version](https://camo.githubusercontent.com/3967c43f48e6708e9cc49c1d7fdf8db4cded8866e870ff9da2be8f58d2c6b58b/68747470733a2f2f706f7365722e707567782e6f72672f6966736e6f702f6d7973716c64756d702d7068702f762f737461626c652e706e67)](https://packagist.org/packages/ifsnop/mysqldump-php)

This is a php version of mysqldump cli that comes with MySQL, without dependencies, output compression and sane defaults.

Out of the box, MySQLDump-PHP supports backing up table structures, the data itself, views, triggers and events.

MySQLDump-PHP is the only library that supports:

- output binary blobs as hex.
- resolves view dependencies (using Stand-In tables).
- output compared against original mysqldump. Linked to travis-ci testing system (testing from php 5.3 to 7.3 &amp; hhvm)
- dumps stored routines (functions and procedures).
- dumps events.
- does extended-insert and/or complete-insert.
- supports virtual columns from MySQL 5.7.
- does insert-ignore, like a REPLACE but ignoring errors if a duplicate key exists.
- modifying data from database on-the-fly when dumping, using hooks.
- can save directly to google cloud storage over a compressed stream wrapper (GZIPSTREAM).

Important
---------

[](#important)

From version 2.0, connections to database are made using the standard DSN, documented in [PDO connection string](https://secure.php.net/manual/en/ref.pdo-mysql.connection.php).

Requirements
------------

[](#requirements)

- PHP 5.3.0 or newer
- MySQL 4.1.0 or newer
- [PDO](https://secure.php.net/pdo)

Installing
----------

[](#installing)

Using [Composer](https://getcomposer.org/):

```
$ composer require ifsnop/mysqldump-php

```

Using [Curl](https://curl.haxx.se/) to always download and decompress the latest release:

```
$ curl --silent --location https://api.github.com/repos/ifsnop/mysqldump-php/releases | grep -i tarball_url | head -n 1 | cut -d '"' -f 4 | xargs curl --location --silent | tar xvz

```

Getting started
---------------

[](#getting-started)

With [Autoloader](https://www.php-fig.org/psr/psr-4/)/[Composer](https://getcomposer.org):

```
