Add scheduled tasks in linux to regularly export mysql database data

Source: Internet
Author: User


Add a scheduled task in linux to regularly export data from the mysql database. 1. crontab-e # edit the scheduled task of the current user.
2. edit: press I: Compile the task as follows: */1 *****/usr/local/hy_mysql/bin/mysqldump-uroot-proot -- socket =/tmp/mysql3305.sock test DM001>

/Usr/local/SQL _bak/dm001. SQL>/dev/null 2> & 1 # export data in the database every other minute. www.2cto.com
3. Press Esc key --- ": wq #, which is released after editing and saving.
The task has been edited. The specified table data of the specified database is exported to the specified path every other minute.

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.