1.给root所有授权的帐户sql才干
grant all privileges on *.* to [email protected]"%" identified by ".";
flush privileges;
2.建立bat批处理文件
@echo off set path=%path%;D:\Program Files\MySQL\MySQL Server 5.5\bin set y=%date:~0,4% set m=%date:~5,2% set d=%date:~8,2% set h=%time:~0,2% set cdate=%y%%m%%d%_%h% mysqldump -h 127.0.0.1 -u root --password=***** -e -R --database cmsis > f:\data\cmsis_%cdate%.sql exit
当中cmsis为要备份的数据库,当该批处理文件运行时会在f:\data下生成如cmsis_20140510_16.sql的文件
3.加入计划任务
(1)程序->附件->系统工具->任务计划->加入任务计划
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaGlsMjAwMA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" >
(2)单击下一步
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaGlsMjAwMA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" >
单击浏览选择刚才建立的bat文件
(3)设置任务运行时间
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaGlsMjAwMA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" >
再点击下一步,输入管理员password能够!
版权声明:本文博主原创文章,博客,未经同意不得转载。
时间: 2024-10-25 06:15:49