Steps to configure MySQL Master Slave Replication

Setup Master Configuration File:-

Step-1:-

Opne my.cnf file

comment lines like below

Step-2:-

We have to tell MySQL for which database it should write logs (these logs are used by the slave to see what has changed on the master)

Add these lines to my.cnf

Step-3:-

Then we have to restart the MySQL server

Step-4:-

Then we have to login to mysql

Then have to flush tables in our database:

You will see like this:-

Setup Slave configuration File:-

Step-1:-

Add the following commands to the files

Step-2:-

connect to MySQL

Step-3:-

Restart mysql server

Again connect to the MySQL

Run the bellow commands

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply