MySQL Tutorial 6 - Write a Backup Script (.bat) file for One Database for MySql Database in Windows

preview_player
Показать описание
***********************************************************************************************
Write a Backup Script .bat file for One Database for MySql Database in Windows
***********************************************************************************************

@echo off

:: Auto MySQL Backup in Windows By CHITT RANJAN MAHTO "Chirag"

FOR /f %%a IN 'Small Bracket' WMIC OS GET LocalDateTime ^| FIND "."' 'Small Bracket' DO SET DTS=%%a
SET timeStamp=%DTS:~6,2%-%DTS:~4,2%-%DTS:~0,4%_%DTS:~8,2%%DTS:~10,2%%DTS:~12,2%
:: Name of the database user with rights to all database
set dbuser=root

:: Password for the database user

:: Error Log path - Important in debugging your issues

:: MySQLDump EXE Path

:: Backup Folder Directory path
set backupFolder="C:\MySQLAutoBackup\"

:: One Database name which you want to backup
set dbname=testmaster

%mysqldumpexe% --user=%dbuser% --password=%dbuserpass% --routines --log-error=%errorLogPath% %dbname% ⇒ "%backupFolder%%dbname%_%timeStamp%.sql" 2⇒ "%backupFolder%%dbname%_%timeStamp%.log"

Note: Flow the Process shown in video.

😉Subscribe and like for more videos:
💛Don't forget to, 💘Follow, 💝Like, 💖Share & 💙Comment

Tutorial Link:

Thanks & Regards,
Chitt Ranjan Mahto "Chirag"
_____________________________________________________________________
Note: All scripts used in this demo will be available in our website.
Link will be available in description.

#MySQLTutorial,
#ChiragsMySQLTutorial,
#CreateDatabaseinMySQL,
#CreateTablesinMySQL,
#MasterSlaveReplicationinMySQL,
#MySQLReplication,
#MySQLMasterSlave,
#InstallMySQLinUbuntu,
#InstallMySQLinLinux,
#InstallMySQLinWindows
Рекомендации по теме
join shbcf.ru