Hi ,

--> When there is data modifying query comes to master it get logged to 
mysql-bin-0000xx file.
     
   If you want to  replicate previous database then you should have the 
mysql-bin file name and position no. before it get created. so that you can 
sync replication with previous database ,

--> If you dont have previous bin-log file name and position no then, follow 
bellow steps,
  
 1)    on master;
         FLUSH TABLES WITH READ LOCK;

 2)    then,
      take backup of database data directory /var/lib/mysql/database-name

 3)    Send it to slave's /var/lib/mysql

 4)   Restart mysqld on slave.

 5)   On master SHOW MASTER STATUS;

 6)   On Slave, stop slave;

 7) ON slave, Change master position with current master status;
 
 8)  on slave, start the slave by START SLAVE.

 9) On master Unlock the table by UNLOCK TABLES;


and check weather your required databases get sync or not.

Regards,
Digambar Warke

++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--- On Tue, 3/2/10, prashik pawar <pawarpras...@yahoo.co.in> wrote:

From: prashik pawar <pawarpras...@yahoo.co.in>
Subject: RE: [Linux_Mantra] Fw: Re: MYSQL Replicatioin.......need HELP
To: Linux_Mantra@yahoogroups.com
Date: Tuesday, March 2, 2010, 7:41 AM







 



  


    
      
      
      thanx frends...... ......... for ur help.......



--- On Tue, 2/3/10, prashik pawar <pawarprashik@ yahoo.co. in> wrote:



From: prashik pawar <pawarprashik@ yahoo.co. in>

Subject: RE: [Linux_Mantra] Fw: Re: MYSQL Replicatioin. ......need HELP

To: Linux_Mantra@ yahoogroups. com

Date: Tuesday, 2 March, 2010, 12:15 PM



 



Hi sir,



   Its working properly. When I created new database on master its dispaly on 
slave aslo, but the database which are already in master server, how to 
transfer dat in slave.



Regards



Prashik Pawar



9664384939



--- On Tue, 2/3/10, Jitendra | Sabsebolo <jitendra.g@ sabsebol o.com> wrote:



From: Jitendra | Sabsebolo <jitendra.g@ sabsebol o.com>



Subject: RE: [Linux_Mantra] Fw: Re: MYSQL Replicatioin. ......need HELP



To: Linux_Mantra@ yahoogroups. com



Date: Tuesday, 2 March, 2010, 11:56 AM



 



Prashik,



Things are seems to be fine after looking at SHOW SLAVE STATUS, master n



slave are in sync



try to create database on your master server n check whether it's getting



replicated on your slave server or not



JITENDRA



From: Linux_Mantra@ yahoogroups. com [mailto:Linux_ Mantra@ yahoogroups. com] On



Behalf Of prashik pawar



Sent: Tuesday, March 02, 2010 11:47 AM



To: Linux_Mantra@ yahoogroups. com



Subject: [Linux_Mantra] Fw: Re: MYSQL Replicatioin. ......need HELP



--- On Tue, 2/3/10, prashik pawar <pawarprashik@ yahoo.co. in



<mailto:pawarprashi k%40yahoo. co.in> > wrote:



From: prashik pawar <pawarprashik@ yahoo.co. in



<mailto:pawarprashi k%40yahoo. co.in> >



Subject: Re: MYSQL Replicatioin. ......need HELP



To: "e- cool" <ecoolsystems@ yahoo.com <mailto:ecoolsystem s%40yahoo. com> >



Date: Tuesday, 2 March, 2010, 11:45 AM



Hi,



This is my slave status/master status :-



mysql> SHOW SLAVE STATUS\G;



************ ********* ****** 1. row ************ ********* ******



Slave_IO_State: Waiting for master to send event



Master_Host: 192.168.10.47



Master_User: prashikmysql



Master_Port: 3306



Connect_Retry: 60



Master_Log_File: mysql-bin.000047



Read_Master_ Log_Pos: 98



Relay_Log_File: Nilesh-relay- bin.000002



Relay_Log_Pos: 235



Relay_Master_ Log_File: mysql-bin.000047



Slave_IO_Running: Yes



Slave_SQL_Running: Yes



Replicate_Do_ DB:



Replicate_Ignore_ DB:



Replicate_Do_ Table:



Replicate_Ignore_ Table:



Replicate_Wild_ Do_Table:



Replicate_Wild_ Ignore_Table:



Last_Errno: 0



Last_Error:



Skip_Counter: 0



Exec_Master_ Log_Pos: 98



Relay_Log_Space: 235



Until_Condition: None



Until_Log_File:



Until_Log_Pos: 0



Master_SSL_Allowed: No



Master_SSL_CA_ File:



Master_SSL_CA_ Path:



Master_SSL_Cert:



Master_SSL_Cipher:



Master_SSL_Key:



Seconds_Behind_ Master: 0



1 row in set (0.00 sec)



ERROR:



No query specified



############ ######### ######### ######### ######### ######### ######### #



mysql> SHOW MASTER STATUS;



+----------- -------+- --------- +-------- ------+-- --------- -------+



| File             | Position | Binlog_Do_DB | Binlog_Ignore_ DB |



+----------- -------+- --------- +-------- ------+-- --------- -------+



| mysql-bin.000047



|       98 |              |                  | 



+----------- -------+- --------- +-------- ------+-- --------- -------+



1 row in set (0.00 sec)



Regards, 



Prashik Pawar



9664384939



--- On Tue, 2/3/10, e- cool <ecoolsystems@ yahoo.com



<mailto:ecoolsystem s%40yahoo. com> > wrote:



From: e- cool <ecoolsystems@ yahoo.com <mailto:ecoolsystem s%40yahoo. com> >



Subject: MYSQL Replicatioin. ......need HELP



To: pawarprashik@ yahoo.co. in <mailto:pawarprashi k%40yahoo. co.in> 



Cc: b.sad...@gmail. com <mailto:b.sadhiq% 40gmail.com> ,



jitendra.gondaliya@ gmail.com <mailto:jitendra. gondaliya% 40gmail.com> 



Date: Tuesday, 2 March, 2010, 1:14 AM



Hi,



Please send output of the "show slave status \G;" 



OR 



run it on slave and check following things,



------------ --------- --------- --------- --------- --------- -



1)  Master_Log_File: pradip.0000xx 



Read_Master_ Log_Pos: 5114



-->  match this bin log file and pos number name with #show master status; (



should be same /nearer )



if this matches well means your IO thread working fine.



------------ --------- --------- --------- --------- --------- -



2)          Slave_IO_Running: Yes            



Slave_SQL_Running: Yes



--> Check all those Yes or no.



------------ --------- --------- --------- --------- --------- -



3)  Exec_Master_ Log_Pos: 5114 



-->  This should be matched/ nearer with "Read_Master_ Log_Pos" means your



SQL thread is properly working.



------------ --------- --------- --------- --------- --------- -



4) If 1st and 2nd point are not satisfied then do telnet from your



master to your slave 3306 port number. ( to check your windows firewall



blocking it or not )



------------ --------- --------- --------- --------- --------- -



Note:- For security and privacy take care for not mentioning real user-name



and passwords in configuration file.



For more clarification revert back,



Regards,



Digambar Warke



(Enjoy excellence of open source world)



The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.



Your Mail works best with the New Yahoo Optimized IE8. Get it NOW!



http://downloads. yahoo.com/ in/internetexplo rer/



[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]



The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo. com/



[Non-text portions of this message have been removed]



The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo. com/



[Non-text portions of this message have been removed]





    
     

    
    


 



  






      

[Non-text portions of this message have been removed]

Reply via email to