MySQL automatically checks and starts a small way to slave threads to improve operational efficiency

Source: Internet
Author: User


  1. Problem

Some company database architecture is two master multi-slave, double live across IDC room, so there is a problem. The synchronization of databases across computer rooms will inevitably

There is a network jitter, an exception that is caused by the slave Io,slave SQL thread shutdown situation.


2. Solution to the thinking

1) Write a script to monitor the slave status regularly

2) Use Shell to write

3) Use crontab per minute to check, judge, and then execute the start slave according to judgment.


The specific wording, need everyone to write their own, only in this way can be promoted.


Knowledge points

1) crontab usage, check every number of minutes

2) shell if [] then judge to complete.





This article is from the "ROIDBA" blog, make sure to keep this source http://roidba.blog.51cto.com/12318731/1887163

MySQL automatically checks and starts a small way to slave threads to improve operational efficiency

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.