Home > Backend Development > PHP Tutorial > Optimizing Availability with MySQL Built-in Replication (1)_PHP Tutorial

Optimizing Availability with MySQL Built-in Replication (1)_PHP Tutorial

WBOY
Release: 2016-07-13 17:22:09
Original
1014 people have browsed it

At Soundbreak we play live audio and video 24 hours a day, so we couldn't do a very convincing test of MySQL's new replication features. Through testing, we found that we can use this feature to maintain data synchronization with the backup database server, so that when the main server fails for some reason, the backup machine can be used to process all queries. For such requirements, it is not difficult to configure two servers. I will discuss the entire process in detail and also discuss how to use PHP to redirect queries when the main server fails.
The MySQL internal replication function is established between two or more servers and is implemented by setting the master-slave relationship between them. One of them acts as the master server, and the other acts as the slave server. I will discuss in detail how to configure two servers, making one the master and the other a slave. And describe the process of switching between them. I performed the configuration setting process on MySQL version 3.23.23, and also conducted the test on this version. MySQL developers recommend that it is best to use the latest version and that both master and slave servers use the same version. At the same time, MySQL version 3.23 is still a beta version, and this version may not be backward compatible. So for this reason, in actual websites, I am not using this version yet. One benefit of having fault tolerance is that the server can be upgraded without interrupting any queries.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532380.htmlTechArticleAt Soundbreak we play live audio and video 24 hours a day, so for MySQL’s new replication features , we cannot make a very convincing test. By testing we...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template