Steps to configure MySQL Master Slave Replication

Setup Master Configuration File:-


Opne my.cnf file

comment lines like below


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


Then we have to restart the MySQL server


Then we have to login to mysql

Then have to flush tables in our database:

You will see like this:-

Setup Slave configuration File:-


Add the following commands to the files


connect to MySQL


Restart mysql server

Again connect to the MySQL

Run the bellow commands

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