Using MySQL built-in replication to optimize usability (i) _php tutorial

Source: Internet
Author: User
In Soundbreak we play live audio and video 24 hours a day without interruption, so we can't make a very convincing test of MySQL's new copy feature. By testing we found that this feature can be used to keep data synchronized with the backup database server, so that when the primary server fails for some reason, it can use the backup machine to process all queries. For such requirements, it is not difficult to configure two servers. I'll discuss the entire process in detail, and discuss how to use PHP to redirect queries when the primary server fails.
The MySQL internal replication feature is built between two or more servers and is implemented by setting the master-slave relationship between them. One serves as the primary server, and the other as the slave server. I'll discuss in detail how to configure two servers, one set as the primary and the other from the server. and describe the process of switching between them. I was in MySQL's 3.23.23 version of the configuration setup process, and also in this version of the test. MySQL developers recommend that you use the latest version, and that the master-slave server uses the same version. MySQL version 3.23 is still beta, and this version may not be backwards compatible. So for this reason, in the actual website, I haven't used this version yet. One benefit of having fault tolerance is the ability to upgrade servers without interrupting any queries.

http://www.bkjia.com/PHPjc/532380.html www.bkjia.com true http://www.bkjia.com/PHPjc/532380.html techarticle in Soundbreak we play live audio and video 24 hours a day without interruption, so we can't make a very convincing test of MySQL's new copy feature. By testing US ...

  • 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.