LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-12-2010, 01:21 AM   #1
ajayan
Member
 
Registered: Dec 2007
Posts: 89

Rep: Reputation: 16
Fail over Scenario in MySQL Replication


i had configured a MySQl Replication Server with 2 DB Servers.Now we are planning to implement a failover Scenario.If Master fails The slave should act as a Master and we have a addition server.It will be going to act as slve.i had mentioned the points below..


Replication
(Master Server)----->----(Slave Server)-----------(Additional Server)
DBS 1 DBS 2 DBS 3

1.Replication is made between Master (DBS 1) and Slave (DBS 2) (successfully done)

2.If Master (DBS 1) failed Slave (DBS 2) should act as a Master and Additional Server (DBS 3) needs to be Slave

3.Whenever Orginal Master (DBS 1) became online the current Master ie ..Slave (DBS 2) should go back to Slave position and all lost data will be replicated to Master DBS 1.

how can i meet this scenario..Any Suggestion will be appreciated..

Thanks
Ajayan
 
Old 09-12-2010, 02:18 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

Have a look at this chapter at dev.mysql.com. It has everything you need to configure your situation and the steps to follow when the master fails.

Kind regards,

Eric
 
1 members found this post helpful.
Old 09-12-2010, 08:28 AM   #3
ajayan
Member
 
Registered: Dec 2007
Posts: 89

Original Poster
Rep: Reputation: 16
Thanks My Friend..
It was a Nice article and now i got a good idea.I will try to work out this.

Since i Working with Critical data,is any option to automate this failover Scenario otherwise i have to keep an eye to Change Master-Slave Settings on each server.

Thanks,
Ajayan
 
Old 09-12-2010, 08:34 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

In order to monitor the status of your servers, it might be handier to write your own script using Bash or another scripting language and have it send an email or other notification when a node is not replicating correctly or when the master is down. If you have a monitoring server like Nagios you can also include it in there.

Kind regards,

Eric
 
Old 09-12-2010, 08:59 AM   #5
ajayan
Member
 
Registered: Dec 2007
Posts: 89

Original Poster
Rep: Reputation: 16
What about Using HA/DRBD..Will it make any Sense?.
 
Old 09-12-2010, 09:05 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Of course that would make sense. Have a look at HeartBeat in combination with Pacemaker. I don't have experience with DRBD so I cannot elaborate on that option, but I'm sure there will be someone on LQ who'll step in.

Kind regards,

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql replication failed after mysql reboot ajayan Linux - Newbie 8 09-08-2010 11:00 AM
MySQL replication Padawan.AVT Linux - Server 4 06-16-2009 09:27 PM
MySQL Replication ACDII Linux - Server 5 12-18-2006 08:08 AM
mysql replication twistedpair Linux - General 7 06-23-2006 10:10 AM
Mysql replication pk21 Linux - Software 0 08-28-2003 05:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration