Chapter 18 . (Web site directory) Replication 537 Note You must
Saturday, May 31st, 2008Chapter 18 . Replication 537 Note You must update your applications and any other processes so that they use the new master server. If you don t do this, updates made to the old master won t be propagated to the replication partners! Unfortunately, there is no elegant solution for switching to original master server. Changing back so that the original server is again the master in the replication set involves making the original master a slave server and then following the steps in this section to change master servers on the slaves. The applications will also need to be updated to point back to the original master. Pass-through slave replication Pass-through or daisy-chain replication is a term to describe replication from a single master to a slave that then acts as a master for one or more slaves. Configuration of this type of replication is simple and similar to configuration of multiple master servers. On the slave that you want to act as a master add the following lines to the MySQL configuration file under the [mysqld] section: log-bin log-slave-updates Stop and restart the MySQL server. Add users and grants for the replication user or users that will be connecting as slaves. On each slave server configure the master as you would any other master, pointing it to the appropriate master server. Those steps are all necessary for pass-through replication. Monitoring Replication Even though replication is stable and constantly being improved, it is still another level of complication to a database. In addition, it creates yet another item that can fail and cause the administrator to lose time and sleep. Therefore, it is necessary to monitor the replication cluster to ensure that it is behaving as expected. This section examines some methods for monitoring replication including manual and semi-automated monitoring. Monitoring replication with Perl The simplest way to monitor replication is simply by typing SHOW SLAVE STATUS although this approach can quickly become a burden for a replication set of any size. Even the smallest replication set must have its status monitored fortunately, a relatively efficient method for doing so exists.
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.