Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 1.74 KB

README.md

File metadata and controls

59 lines (46 loc) · 1.74 KB

MySQLDump - PHP

This is a php version of linux's mysqldump in terminal "$ mysqldump -u username -p...".

Requirements

  • PHP 5 >= 5.1.0
  • PECL pdo >= 0.2.0

Getting started

<?php
$dumpSettings = array(
	'include-tables' => array('table1', 'table2'),
	'exclude-tables' => array('users', 'records'),
	'compress' => 'GZIP',
	'no-data' => false,
	'add-drop-table' => false,
	'single-transaction' => true,
	'lock-tables' => false,
	'add-locks' => true,
	'extended-insert' => true
);

$dump = new Mysqldump('clouddueling', 'root', 'root', 'localhost', 'mysql', $dumpSettings);
$dump->start('storage/work/dump.sql');

API

License

The Laravel framework is open-sourced software licensed under the MIT license

Credits

Originally written by James Elliott in 2009 but has since been almost entirely rewritten and improved upon. http://code.google.com/p/db-mysqldump/

Todos

  • Replace public extend() with array_merge_recursive()