Re: Chain Replication QUestion

2013-05-06 Thread Michael Dykman
That is correct.


On Mon, May 6, 2013 at 11:06 AM, Richard Reina  wrote:

> To activate log-slave-updates do I just add "log-slave-updates" to the
> my.cnf file?
>
>
>
> 2013/4/30, Manuel Arostegui :
> > 2013/4/30 Richard Reina 
> >
> >> I have a few slaves set up on my local network that get updates from
> >> my main mysql database master. I was hoping to turn one into a master
> >> while keeping it a slave so that I can set up a chain.  Does anyone
> >> know where I can find a "how to" or other documentation for this
> >> specific task?
> >>
> >>
> > It is quite easy:
> >
> > Enable log-slave-updates in the slave you want to be a master.
> > Do a mysqldump -e --master-data=2 and put that mysqldump in the future
> > slaves. Take a look at the first lines of the mysqldump where you'll find
> > the position and logfile those slaves need to start the replication from.
> > You can also use xtrabackup if you like.
> >
> > Manuel.
> >
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
>
>


-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.


Re: Chain Replication QUestion

2013-05-06 Thread Richard Reina
To activate log-slave-updates do I just add "log-slave-updates" to the
my.cnf file?



2013/4/30, Manuel Arostegui :
> 2013/4/30 Richard Reina 
>
>> I have a few slaves set up on my local network that get updates from
>> my main mysql database master. I was hoping to turn one into a master
>> while keeping it a slave so that I can set up a chain.  Does anyone
>> know where I can find a "how to" or other documentation for this
>> specific task?
>>
>>
> It is quite easy:
>
> Enable log-slave-updates in the slave you want to be a master.
> Do a mysqldump -e --master-data=2 and put that mysqldump in the future
> slaves. Take a look at the first lines of the mysqldump where you'll find
> the position and logfile those slaves need to start the replication from.
> You can also use xtrabackup if you like.
>
> Manuel.
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



RE: Chain Replication QUestion

2013-05-01 Thread Rick James
> 1) Enable log-bin on master2 (slave that will be converted to a master)
That does not 'convert' it -- it makes it both a Master and a Slave (a "Relay").

The CHANGE MASTER is probably correct, but it is difficult to find the right 
spot.
A simple way is to 
1. Stop all writes everywhere.
2. Wait for replication to catchup everywhere.
3. FLUSH LOGS everywhere.
4. Now CHANGE MASTER on the Slave to the start (POS=0 or 4) of the freshly 
created binlog in the machine that is the Slave's new Master.
5. Start writes.


> -Original Message-
> From: Richard Reina [mailto:gatorre...@gmail.com]
> Sent: Wednesday, May 01, 2013 6:00 AM
> To: Manuel Arostegui
> Cc: mysql@lists.mysql.com
> Subject: Re: Chain Replication QUestion
> 
> Hello Manuel,
> 
> Thank you for your reply. Could I do the following?:
> 
> 1) Enable log-bin on master2 (slave that will be converted to a master)
> 2) Enable log-slave-updates on master2
> 3) Execute CHANGE MASTER to on another existing slave so that it gets
> it's updates from master2 instead of master1.
> 
> Thanks for the help thus far.
> 
> 
> 2013/4/30, Manuel Arostegui :
> > 2013/4/30 Richard Reina 
> >
> >> I have a few slaves set up on my local network that get updates from
> >> my main mysql database master. I was hoping to turn one into a
> master
> >> while keeping it a slave so that I can set up a chain.  Does anyone
> >> know where I can find a "how to" or other documentation for this
> >> specific task?
> >>
> >>
> > It is quite easy:
> >
> > Enable log-slave-updates in the slave you want to be a master.
> > Do a mysqldump -e --master-data=2 and put that mysqldump in the
> future
> > slaves. Take a look at the first lines of the mysqldump where you'll
> > find the position and logfile those slaves need to start the
> replication from.
> > You can also use xtrabackup if you like.
> >
> > Manuel.
> >
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



RE: Chain Replication QUestion

2013-05-01 Thread Andrew Morgan
If you're able to use MySQL 5.6 and enable GTIDs then it gets a whole lot 
simpler as you don't need to worry about finding the correct positions in the 
binary logs. Take a look at 
http://www.mysql.com/why-mysql/white-papers/mysql-replication-high-availability/
 and http://www.mysql.com/why-mysql/white-papers/mysql-replication-tutorial/

Andrew.

> -Original Message-
> From: Rick James [mailto:rja...@yahoo-inc.com]
> Sent: 01 May 2013 16:29
> To: Richard Reina; Manuel Arostegui
> Cc: mysql@lists.mysql.com
> Subject: RE: Chain Replication QUestion
> 
> > 1) Enable log-bin on master2 (slave that will be converted to a
> master)
> That does not 'convert' it -- it makes it both a Master and a Slave (a
> "Relay").
> 
> The CHANGE MASTER is probably correct, but it is difficult to find the
> right spot.
> A simple way is to
> 1. Stop all writes everywhere.
> 2. Wait for replication to catchup everywhere.
> 3. FLUSH LOGS everywhere.
> 4. Now CHANGE MASTER on the Slave to the start (POS=0 or 4) of the
> freshly created binlog in the machine that is the Slave's new Master.
> 5. Start writes.
> 
> 
> > -Original Message-
> > From: Richard Reina [mailto:gatorre...@gmail.com]
> > Sent: Wednesday, May 01, 2013 6:00 AM
> > To: Manuel Arostegui
> > Cc: mysql@lists.mysql.com
> > Subject: Re: Chain Replication QUestion
> >
> > Hello Manuel,
> >
> > Thank you for your reply. Could I do the following?:
> >
> > 1) Enable log-bin on master2 (slave that will be converted to a
> master)
> > 2) Enable log-slave-updates on master2
> > 3) Execute CHANGE MASTER to on another existing slave so that it gets
> > it's updates from master2 instead of master1.
> >
> > Thanks for the help thus far.
> >
> >
> > 2013/4/30, Manuel Arostegui :
> > > 2013/4/30 Richard Reina 
> > >
> > >> I have a few slaves set up on my local network that get updates
> from
> > >> my main mysql database master. I was hoping to turn one into a
> > master
> > >> while keeping it a slave so that I can set up a chain.  Does
> anyone
> > >> know where I can find a "how to" or other documentation for this
> > >> specific task?
> > >>
> > >>
> > > It is quite easy:
> > >
> > > Enable log-slave-updates in the slave you want to be a master.
> > > Do a mysqldump -e --master-data=2 and put that mysqldump in the
> > future
> > > slaves. Take a look at the first lines of the mysqldump where
> you'll
> > > find the position and logfile those slaves need to start the
> > replication from.
> > > You can also use xtrabackup if you like.
> > >
> > > Manuel.
> > >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:http://lists.mysql.com/mysql
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
> 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Chain Replication QUestion

2013-05-01 Thread Richard Reina
Hello Manuel,

Thank you for your reply. Could I do the following?:

1) Enable log-bin on master2 (slave that will be converted to a master)
2) Enable log-slave-updates on master2
3) Execute CHANGE MASTER to on another existing slave so that it gets
it's updates from master2 instead of master1.

Thanks for the help thus far.


2013/4/30, Manuel Arostegui :
> 2013/4/30 Richard Reina 
>
>> I have a few slaves set up on my local network that get updates from
>> my main mysql database master. I was hoping to turn one into a master
>> while keeping it a slave so that I can set up a chain.  Does anyone
>> know where I can find a "how to" or other documentation for this
>> specific task?
>>
>>
> It is quite easy:
>
> Enable log-slave-updates in the slave you want to be a master.
> Do a mysqldump -e --master-data=2 and put that mysqldump in the future
> slaves. Take a look at the first lines of the mysqldump where you'll find
> the position and logfile those slaves need to start the replication from.
> You can also use xtrabackup if you like.
>
> Manuel.
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Chain Replication QUestion

2013-04-30 Thread Manuel Arostegui
2013/4/30 Richard Reina 

> I have a few slaves set up on my local network that get updates from
> my main mysql database master. I was hoping to turn one into a master
> while keeping it a slave so that I can set up a chain.  Does anyone
> know where I can find a "how to" or other documentation for this
> specific task?
>
>
It is quite easy:

Enable log-slave-updates in the slave you want to be a master.
Do a mysqldump -e --master-data=2 and put that mysqldump in the future
slaves. Take a look at the first lines of the mysqldump where you'll find
the position and logfile those slaves need to start the replication from.
You can also use xtrabackup if you like.

Manuel.