1. 程式人生 > >Windows下實現mysql定時備份

Windows下實現mysql定時備份

1、寫MySQL備份bat處理

@echo off
set "yMd=%date:~,4%%date:~5,2%%date:~8,2%"
set "hms=%time:~,2%%time:~3,2%%time:~6,2%"
"C:/Program Files (x86)/MySQL/MySQL Server 5.5/bin/mysqldump.exe" -uroot -p123456 demo>D:/mysql_backup_%yMd%-%hms%.sql
@echo on

2、開啟Windows的任務計劃