Home > Database > Mysql Tutorial > body text

Windows Server服务器端MySQL数据库自动备份_MySQL

WBOY
Release: 2016-06-01 13:14:40
Original
1002 people have browsed it
1.给root账户授权所有sql权限
grant all privileges on *.* to root@"%" identified by ".";
Copy after login
flush privileges;
Copy after login
2.建立bat批处理文件
@echo offset path=%path%;D:/Program Files/MySQL/MySQL Server 5.5/binset 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%.sqlexit
Copy after login

其中cmsis为要备份的数据库,当该批处理文件执行时会在f:/data下生成如cmsis_20140510_16.sql的文件

3.添加计划任务

(1)程序->附件->系统工具->任务计划->添加任务计划

(2)单击下一步

单击浏览选择刚才建立的bat文件
(3)设置任务执行时间


再单击下一步输入管理员密码即可!
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template