Skip to content

Commit

Permalink
Usage of configurated mysql port with mysqldump
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFink committed Aug 18, 2014
1 parent 275be96 commit a97f246
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public function create($database, $file, array $params)
$command .= sprintf(" -p%s", escapeshellarg($params['password']));
}

if (isset($params['port'])) {
$command .= sprintf(" -P%s", escapeshellarg($params['port']));
}

$this->runCommand($command);
}

Expand All @@ -95,6 +99,10 @@ public function restore($database, $file, array $params)
$command .= sprintf(" -p%s", escapeshellarg($params['password']));
}

if (isset($params['port'])) {
$command .= sprintf(" -P%s", escapeshellarg($params['port']));
}

$this->runCommand($command);
}
}

0 comments on commit a97f246

Please sign in to comment.