Skip to content

Instantly share code, notes, and snippets.

@LQ80
Created January 22, 2020 09:52
Show Gist options
  • Save LQ80/9875494b1866b4926cc0cd731dd7e445 to your computer and use it in GitHub Desktop.
Save LQ80/9875494b1866b4926cc0cd731dd7e445 to your computer and use it in GitHub Desktop.
MySQL Backup Databases
for /f %%x in ('mysql.exe -u root -p -e "show databases" -s --skip-column-names') do (
mysqldump.exe -u root --databases %%x > .\databases\%%x.sql
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment