MySQL database dump.

Installs: 1 949 929

Dependents: 13

Suggesters: 0

Security: 0

Stars: 198

Watchers: 17

Forks: 50

v1.5.1 2019-09-10 21:36 UTC

This package is auto-updated.

Last update: 2023-11-12 06:40:00 UTC


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.


Create MySQLi 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():


Import dump from file to database this way:

$import = new MySQLImport($db);

If you like it, please make a donation now. Thank you!