MySQL Automatic backup

Source: Internet
Author: User
Tags mysql automatic backup

MySQL Automatic backup Batch command:

Set "ymd=%date:~,4%%date:~5,2%%date:~8,2%"

Set "hms=%time:~,2%%time:~3,2%%time:~6,2%"

Mysqldump-uroot--password=password weixin> D:\mysql_back\weixin_%Ymd%_%hMs%.sql

Command explanation

To use mysqldump to set environment variables

Mysqldump.exe program in the bin directory of the MySQL installation directory

Set is a command for a batch set variable

%date:~,4% is a string that takes the date variable position 0 starting at length 4

%date:~5,2% is a string that takes the date variable position 5 starting at length 4

Weixin is the name of the database.

> behind is the output directory

Windows Task scheduling implementation performs batch processing at a time interval

Run ( Win+r ), enter Taskschd.msc Open Task Scheduler

Click Task Scheduler Library

Right there's a basic task to create

Step by step with

Finally, enter the path of the batch process to

Task Scheduler can be managed in Task Scheduler

MySQL Automatic backup

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.