Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Wednesday, July 17, 2013

MySQL Master Slave Replication

MySQL Master Slave Replication
MySQL replication is a process that allows us to easily maintain multiple copies of a MySQL data. MySQL data get automatically copied from a master to a slave database. This concept is helpful for many reasons including 
a. Automatically backing up for the data.
b. Providing alternate database server if master server get crashed somehow.
To check the replication status in Master Slave environment (MySQL). Just need to follow these steps:


1. Connect to MySQL slave server
   mysql -u user -p password -P port
2. After connecting to mysql, check the slave status
   mysql > show slave status \G;
3. Now check the values of these three variables: Slave_IO_Running, Slave_SQL_Running & Seconds_Behind_Master. If the values for these three variable are as follows then master-slave replication is intact and in sync.
   Slave_IO_Running : Yes
   Slave_SQL_Running : Yes
   Seconds_Behind_Master : 0


No comments:

Post a Comment