Skip to content

Commit

Permalink
Fix connection error in private-dump
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyhindle committed Jan 20, 2019
1 parent 34a6610 commit 4c4fb54
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions private-dump
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if (!$config->isValid()) {
$databases = $config->get('databases');

foreach ($databases as $databaseName => $tables) {
$dumper = new \Ifsnop\Mysqldump\Mysqldump($config->getDSN($databaseName), $config->get('mysql.username'), $config->get('mysql.password'), $dumpSettings);
$dumper = new \Ifsnop\Mysqldump\Mysqldump($config->getDSN($databaseName), $config->get('connection.username'), $config->get('connection.password'), $dumpSettings);

$tableLimits = $config->getTableLimits($databaseName);
if (!empty($tableLimits)) {
Expand Down Expand Up @@ -72,5 +72,9 @@ foreach ($databases as $databaseName => $tables) {
return $transformer->transform($colValue, $columnReplacer);
});

$dumper->start('php://output');
try {
$dumper->start('php://output');
} catch (\Exception $e) {
$console->error("Failed to dump: {$e->getMessage()}", 3);
}
}

0 comments on commit 4c4fb54

Please sign in to comment.