Skip to content

Instantly share code, notes, and snippets.

@SyZn
Created March 23, 2014 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SyZn/9724977 to your computer and use it in GitHub Desktop.
Save SyZn/9724977 to your computer and use it in GitHub Desktop.
Dump mysql with powershell
function dump-yourdb {
$command_pattern = "C:\path\to\mysqldump.exe -u {0} -p{1} --skip-extended-insert --skip-dump-date {2} -r {3}"
$command = $command_pattern -f '<username>','<password>','<database>','C:\path\to\dumpfile'
echo 'Executing: ' $command
Invoke-Expression $command
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment