Created
March 23, 2014 15:49
-
-
Save SyZn/9724977 to your computer and use it in GitHub Desktop.
Dump mysql with powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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