At the master:
- RESET MASTER;
- FLUSH TABLES WITH READ LOCK;
- SHOW MASTER STATUS;
Wihtout closing the connection to the client (because it would release the read lock) issue the command to get a dump of the master.
- mysqldump -uroot -p --all-databases > /a/path/mysqldump.sql
- UNLOCK TABLES;
At the slave
Open a connection to mysql and type
- STOP SLAVE;
- mysql -uroot -p < mysqldump.sql
- RESET SLAVE;
- CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=98;
Finally type
- START SLAVE;
- SHOW SLAVE STATUS;
- Slave_IO_Running: Yes
- Slave_SQL_Running: Yes

Santhakumar MunuswamyPosted Apr 30, 2015, 3:24 PM
Thanks for sharing