Replication

If you are here reading Replication for MySQL, if you know what type of replication is available in other databases, then it may be a bit troubling for you to understand. However, One point will make everything clear.

In MySQL replication is that of the Binary Log, which has user’s commands logged in it.

Generally replication is used when there are many servers to balance the load and have the same data. In such cases, Usually A single master and multiple Slaves are used.

So let us consider we have 3 servers,

  • Server A: The Master Server (192.168.5.100)
  • Server B: The Slave Server no. 1 (192.168.5.101)
  • Server C: The Slave Server no. 2 (192.168.5.102)

The Servers B and C are peers to each other.

We’ll set up replication of the database test. When I say database “test”, it means its all tables are replicated as well. I’ll come up to the specific configurations, etc … but later. I assume we are starting with an empty database.

To setup replication, we need to configure the following

  • Master
    • Binary log
    • …and some configuration
  • Slave: Configuration of the master for the slave

2 thoughts on “Replication”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.