Operating environment windows
Create a dbback.bat file, as follows
OFF @echo SET H% = Time: ~ 0 , 2 % SET H =% H: = 0 % SET hhmiss =% DATE: ~ 0 , . 4 %% DATE: ~ . 5 , 2 %% DATE: ~ . 8 , 2 % Time %% H%: ~ . 3 , 2 %% Time: ~ . 6 , 2 % SET " Folder =% DATE: DATE %% ~ 0,4: 5,2 ~ %% DATE: ~ 8,2% " :: folder is automatically created that day (dbBack this folder need to create your own) IF not exist D: \ dbBack \% folder% (md D: \ dbBack \% folder% ) : :( MySQL path) \ bin \ mysqldump --opt - u -p database database account password database name>Output address \ MySQL \ bin \ mysqldump --opt -u root -pARmvqRCx $ ZIzYa w zhonxin666> D:! \ DbBack \% Folder% \ zhonxin666_% hhmiss% .sql @echo ON
:: formal operating environment to pause to remove, or cmd black window will remain
pause
The dbback.bat into the windows scheduled tasks inside (do not understand their own partner Baidu this step) a day repeat interval needs to be adjusted according to their own