Mysql Remote Automation Backup

Source: Internet
Author: User
Lab Environment:
A total of 2 MySQL servers A and B, on the B remote backup a database on a, set up a database on a Google and Baidu, pay attention to the firewall on the 3306 port or shut down firewalls;
Experimental topology:
Experimental steps
1) Set up a database on a

2) set up a dedicated database user on a, where I use the root account to grant the root account to a 192.168.1.2 connection via a remote host

3) Back up the test on backup Host B

View already backed up successfully

4) write a script on backup Host B before you need to create a backup directory Mkdir-p/opt/beifen
Then write the Script VI mysqlbak.sh

5) do not forget to give the script permission "chmod +x mysqlbak.sh" Before executing the backup script and
Perform:
./mysqlbak.sh
6) View Backup results

7) Set up Scheduled Tasks

Crontab-e

Mysql Remote Automation 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.