These days are doing a project using the MySQL database, the project has been completed, when the project is deployed, is considering how to automatically back up the MySQL database problem, I found on the internet finally solved the data, hereby record.
1@echoif2 Echo.3 echo MySQL Database backup4 5Echo *****************************6 Echo.7Echo Today is%Date%8 echo Time is%time%9 Echo.TenEcho ***************************** One A - Set "ymd=%date:~,4%%date:~5,2%%date:~8,2%" - theMd"D:\db_back\%Ymd%" - - "C:\Program files\mysql\mysql Server 5.5\bin\mysqldump"--opt-q-u user name-p password--default-character-Set=utf8 Database name >"D:\db_back\%Ymd%\%Ymd%"_bak.sql" - + Echo. - + echo MySQL database backup complete, please check ... A at Echo. - Echo. - -Pause
Copy the above code to generate a bat batch file.
Then add a schedule to the Windows scheduled task ...
Shi Road recorded on: July 20, 2014 18:42:18 http://haoxilu.cnblogs.com