Mysql-php + bash backup data

Source: Internet
Author: User
Background: 1. I have two LINUX servers. 2. I have one running the PHP program aa: mysql and the other running the php program bb: mysql3. For some reason, I need to back up: synchronize part of mysql table data to B: mysql has written a shell implemented through mysqldump, mysql, crontab... The background is as follows:
1. I have two LINUX servers.
2. Run One PHP program a: mysql, And the other php program B: mysql.
3. For some reason, you need to back up some data in Table a: mysql and synchronize it to table B: mysql has written a shell to implement scheduled Synchronization Through mysqldump, mysql, and crontab.

The problem is as follows:

I. Prompt for progress in implementing the PHP Interface
1. How to submit a synchronization command in the php background
2. Run the following command after the script receives the command:
3. Notify PHP after the script is executed.
4. If you have the best progress

2. Whether to lock the table when executing mysqldump.

Reply content:

The background is as follows:
1. I have two LINUX servers.
2. Run One PHP program a: mysql, And the other php program B: mysql.
3. For some reason, you need to back up some data in Table a: mysql and synchronize it to table B: mysql has written a shell to implement scheduled Synchronization Through mysqldump, mysql, and crontab.

The problem is as follows:

I. Prompt for progress in implementing the PHP Interface
1. How to submit a synchronization command in the php background
2. Run the following command after the script receives the command:
3. Notify PHP after the script is executed.
4. If you have the best progress

2. Whether to lock the table when executing mysqldump.

For mysql master-slave replication, you can't write shell :)

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.