Skip to content

Instantly share code, notes, and snippets.

@fredrikaverpil
Last active August 29, 2015 13:56
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 fredrikaverpil/9050951 to your computer and use it in GitHub Desktop.
Save fredrikaverpil/9050951 to your computer and use it in GitHub Desktop.
mySQL BAT backup script
REM Export all data from this database
cd C:\Program Files\MySQL\MySQL Server 5.6\bin
REM To export to file (structure only)
mysqldump --no-data [DATABASENAME] -h localhost -u [USER] -p[PASSWORD] > C:\databackup\database_ddl_backup.sql
mysqldump --no-create-info --no-create-db [DATABASENAME] -h localhost -u [USER] -p[PASSWORD] > C:\databackup\database_data.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment