• Home
  • Cisco
  • Exchange
  • Linux
  • Navision
  • Network
  • Virtualization
  • Windows
  • About
  •  

    Backup MySQL on Windows with a script and zip it


    Create a bat file:

    C:\Progra~1\MySQL\MYSQLS~1.5\bin\mysqldump.exe –opt –single-transaction –user=root –password=xxxx DB-name > backup_DB-name.sql

    set backupFilename=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
    C:\Progra~1\7-Zip\7z a MyBackup%backupFilename%.zip *.sql