Automatic MySQL database backup on Windows Server

Source: Internet
Author: User

1. Grant all SQL permissions to the root account

Grant all privileges on *. * to root @ "%" identified ".";
Flush privileges;
2. Create a bat batch file
@ Echo offset path = % path %; D: \ Program Files \ 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

Cmsis is the database to be backed up. When the batch processing file is executed, a file such as cmsis_20140510_16. SQL is generated under f: \ data.

3. Add a scheduled task

(1) Program-> accessories-> System Tools-> Task Plan-> Add Task Plan


(2) Click Next

Click Browse to select the created bat file

(3) set the task execution time



Click Next and enter the administrator password!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.