List:Replication« Previous MessageNext Message »
From:Marcus Bointon Date:April 7 2008 10:45am
Subject:Re: Master - Slave MySQL Database Server
View as plain text  
On 7 Apr 2008, at 11:34, Kaushal Shriyan wrote:

> In that case so setting up Master-Master will serve my purpose of   
> "if the Master goes down, the slave should take care and
> act as Master. the Master should acts as slave and reversing of this  
> role."
>
> Am i correct.

Well, yes, but in fact you don't have to do anything at all at the  
server end - they are continuously acting as both master and slave, so  
all you need to do is change where your app points. You can then  
rebuild/fix your other server, let it catch up with the other server's  
binary logs, and you're back where you were with no down time.

> mysqldump -u root -p --opt --quick --single-transaction --master- 
> data mydb > mydb.sql
>
> I believe the above command does a full backup of database "mydb" In  
> that case whats the best usage of the mysqldump command to restore  
> it in the other host


Yes. To import it you'd typically do:

mysql -u root -p < mydb.sql

or interactively using \. in the mysql client.

Marcus
-- 
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info@hand CRM solutions
marcus@stripped | http://www.synchromedia.co.uk/



Attachment: [application/pkcs7-signature] smime.p7s
Thread
Master - Slave MySQL Database ServerKaushal Shriyan7 Apr
  • Re: Master - Slave MySQL Database ServerMarcus Bointon7 Apr
    • Re: Master - Slave MySQL Database ServerKaushal Shriyan7 Apr
      • Re: Master - Slave MySQL Database ServerMarcus Bointon7 Apr
        • Re: Master - Slave MySQL Database ServerKaushal Shriyan7 Apr
          • Re: Master - Slave MySQL Database ServerMarcus Bointon7 Apr
            • Re: Master - Slave MySQL Database ServerKaushal Shriyan10 Apr
              • Re: Master - Slave MySQL Database ServerMarcus Bointon10 Apr