List:Replication« Previous MessageNext Message »
From:Rick James Date:October 31 2007 3:17pm
Subject:RE: Add a replicated DB w/o rebooting the server
View as plain text  
Your clients "should" be able to handle the restart.
* What if there were a network glitch?  The clients should be able to
reconnect when they notice the dropped connection.
* What if the slave has a disk crash?  The clients should automatically
switch to another slave.
* What if an earthquake wipes out the data center?  Then you need
replication to a remote site.
* Etc.

Adding a line to my.cnf and restarting the slave is minor compared to
all the other things that can (and eventually will) go wrong.

By having two (or more) slaves behind a load balancer, one can simply
(tediously) restart one slave at a time.

> -----Original Message-----
> From: Oriol Capsada [mailto:oriolc@stripped] 
> Sent: Wednesday, October 31, 2007 4:52 AM
> To: replication@stripped
> Subject: Re: Add a replicated DB w/o rebooting the server
> 
> 
> Eric Frazier wrote:
> > Oriol Capsada wrote:
> >> Hi Norbert,
> >>
> >> Ok, when I said reboot the server I was referring to restart the 
> >> mysql proceess. I see that my expression was not clear enough :)
> >>
> >> And I would prefer not to restart the mysql process because some 
> >> services may not have persistent connections. Therefore, 
> if I restart 
> >> the server those connections would be lost...
> >>
> >> So, any way to add the database without having to restart 
> the mysql 
> >> process?
> >>
> >> Regards,
> >> Oriol.
> >>
> >> Norbert Tretkowski wrote:
> >>> Am Mittwoch, den 31.10.2007, 11:21 +0100 schrieb Oriol Capsada:
> >>>  
> >>>> Everything I have read about adding a new database to a slave 
> >>>> replication talks about adding a new line in the 
> configuration file 
> >>>> (for example a replicate-wild-do-table) and then restart 
> the server.
> >>>>
> >>>> Is it possible to do so without having to reboot the server?
> >>>>     
> >>>
> >>> You don't need to reboot the whole server, it's enough to 
> restart just
> >>> the mysqld server process (e.g. with '/etc/init.d/mysql restart').
> >>>
> >>>     Norbert
> >>>
> >>>
> >>>   
> >>
> >>
> >
> > You just need to NOT specify all of the dbs you are 
> replicating. It is 
> > like a tradition that people do that, but not needed. Once 
> you specify 
> > one DB however, you imply that the others are not to be 
> replicated. I 
> > have done this before and create database statements do get 
> replicated 
> > as well.
> >
> > Eric
> >
> >
> 
> As DBs can't be added without rebooting I suppose that this 
> is what I am 
> finally going to do, not specify the DB names and replicate 
> all of them.
> 
> Thanks for your answers.
> 
> Regards,
> Oriol.
> 
> 
> 
> -- 
> MySQL Replication Mailing List
> For list archives: http://lists.mysql.com/replication
> To unsubscribe:    
> http://lists.mysql.com/replication?unsub=1
> 
> 
Thread
Add a replicated DB w/o rebooting the serverOriol Capsada31 Oct
  • Re: Add a replicated DB w/o rebooting the serverNorbert Tretkowski31 Oct
    • Re: Add a replicated DB w/o rebooting the serverOriol Capsada31 Oct
Re: Add a replicated DB w/o rebooting the serverOriol Capsada31 Oct
  • RE: Add a replicated DB w/o rebooting the serverRick James31 Oct
    • Re: Add a replicated DB w/o rebooting the serverOriol Capsada31 Oct
      • Re: Add a replicated DB w/o rebooting the serverMarcus Bointon31 Oct
        • Re: Add a replicated DB w/o rebooting the serverOriol Capsada31 Oct