Skip to content

CarlosCardenasNegro/sqldump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple utility to dump a MySQL database

This is a simple utility that make a dump of a selected database to a text file containts the sql code and the data to recreate the database.

The sql text file should include the table structure the complete data and the indexes.

It don't dump Views, Stored procedures and so... because it's very simple, but it do his job.

It require and use monolog to export messages, error, and so...

Usage

It's so simple. Create a instance of the class passing a \PDO instance and a monolog instance.

And execute his dumpSQL method $example->dumpSQL([$filename]). The filename it's optional (it default to 'Dump.sql')

The other methods can be used also to extract only tables, fields anda data and so,... if you want.

$dumpTest = new sqlDump\sqlDump($pdo, $logger);
echo $dumpTest->dumpSQL();

About

Easy my sql database dump

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages