Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-22-2006, 10:05 AM   #1
Registered: Apr 2004
Distribution: Debian
Posts: 203

Rep: Reputation: 32
mysql slave replication question

I want to set up master slave replication for a mysql database. I've found several howto's and it doesn't look hard to do but I have a some questions I haven't really seen answered directly and would like answered before I commit. I want this for redundancy and to eliminate downtime.

Once set up and replicating, when the master goes down all I would need to do is take the slave out of slave mode and make it a master and then continue as normal. Just moving it into the masters place since it's sync'd up to the time the master went down. Does this sound correct? Then a new slave can be placed to be the backup for this new master, the old slave?

Once set up in a master slave configuration can the slave be updated directly? What I'm thinking is yes it can, but that would take it out of sync with the master giving it unique data that master doesn't have. Which is not what I want.

If the slave does get a direct record input, like in Q2, would the next update from the master wipe that record out? For instance. I have the database I'm replicating with a table called "Addresses". It has an column named "index" that auto increments giving each record it's unique id to identify it, this field must not be null and must be unique, standard kind of thing. Someone adds a record that gets an index number of 350 directly on the slave. The next time the master replicates to the slave it replicates a record with the index number of 350 to the table named "Addresses", an entry which already exists on the slave because it was directly input when it shouldn't have been. Will the record coming from the master delete the existing one on the slave and put it's data into it? Or will the record already exisiting on the slave block the data from the master? Or will there be some other problem and the replication ceases due to an error?

I may have more questions later but these ones that are on my mind and I've been unable to get a clear picture from howto's and the mysql documention.

Old 10-22-2006, 01:38 PM   #2
Registered: Oct 2006
Location: JNB, SA
Posts: 33

Rep: Reputation: 15

The mySQL replication is so automated that it update its replication slave server automatically and when goes down it will adjust slave to master, my recommendation for you, is to use Altramonkey sort of load balancer if you have haveay data loads on your server.

I d'nt seem and hard setup in mySQL replication, its matter of few minutes, thanks
Old 10-22-2006, 08:49 PM   #3
Registered: Apr 2004
Distribution: Debian
Posts: 203

Original Poster
Rep: Reputation: 32
It's not that there is a heavy load, but that low downtime is critical. I want replication so that if the master goes down all we would have to do it start using the slave and downtime is limited to the time it takes you to use the different server address.

My questions I asked in the first post are just so I can understand how the replication works better for my own knowledge and so that I, in the cases like I mentioned, understand what's going on and what steps if any need to be taken next at that time.

Thanks for the suggestions. I'll take a look at those as well.


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
ldap replication master - slave jadid Linux - Software 2 10-18-2006 12:25 PM
OpenLDAP Replication Master\Slave paul_mat Linux - Networking 3 10-18-2006 08:37 AM
openldap replication master/slave slapd.conf paul_mat Linux - Networking 1 11-30-2005 02:54 PM
Webserver file replication (master and slave) demetri007 Linux - Software 1 08-21-2004 10:07 AM
mysql replication cheng Linux - Software 1 08-22-2002 03:11 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:41 PM.

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