ifsnop / mysqldump-php

PHP version of mysqldump cli that comes with MySQL
https://github.com/ifsnop/mysqldump-php
GNU General Public License v3.0
1.25k stars 300 forks source link

How to use compressing methods in this library. #206

Closed kaustubh-scriptbite closed 4 years ago

kaustubh-scriptbite commented 4 years ago

I have tried it by passing array of dumpSetting array to constructor but no luck.

smalos commented 4 years ago

I'm using it like this:

$dumpSettings = [];
$dumpSettings['compress'] = Ifsnop\Mysqldump\Mysqldump::GZIP;
$dumper = new Ifsnop\Mysqldump\Mysqldump("mysql:host=$host_name;dbname=$db_name", 'user', 'password', $dumpSettings);
kamihicouki commented 4 years ago

I have tried it by passing array of dumpSetting array to constructor but no luck.

Hi, Please take a look at my code.

index.php · master · solutus / SALVAGE DB · GitLab