Skip to content

SkyKnight/mysqldump-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 

Repository files navigation

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()

About

mysqldump written in PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%