MySQL Tutorial 7- Write a Backup Script (.bat) file for all Database in One File for MySql DB in Win

preview_player
Показать описание
***********************************************************************************************
Write a Backup Script .bat file for all Database in One File 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

:: Create Folder in C Drive “MySQLAutoBackup”

:: Error Log path - Important in debugging your issues

:: MySQLDump EXE Path

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

%mysqldumpexe% --user=%dbuser% --password=%dbuserpass% --routines --log-error=%errorLogPath% --all-databases ⇒ "%backupFolder%all_databases_%timeStamp%.sql" 2⇒ "%backupFolder%all_databases_%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