Sunday, February 3, 2013

STEPS TO DO FOR MASTER SLAVE REPLICATION IN MySQL

What is Replication?
          
      It is a process that allows you to easily maintain multiple copies of a MySQL data by copied automatically from a master to a slave database. 

Steps to do Replications:

1.Stop the running applications in master server

2.See master status.

Note the binlog file and position in notepad for slave server

3.Create a user for replication in master

4.Change the server id,port number and socket.

5.In slave give as,

            Ex: Change master to master_user='replica',
                                              master_host='localhost',
                                              master_password='replica',
                                              master_log_file='mysql-bin.000015',
                                              master_log_position=107,
                                              port=3306;

6. Start the replication by,
       
           Ex: start slave;

7.Import the master server databases to slave server now
     
   


Thank you.




No comments:

Post a Comment