Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Tweeted twitter.com/StackDBAs/status/650659362567012353
More descriptive title, minor grammatical corrections
Source Link

MySQL Replication Relaying changes to a slave from another master with Tungsten on MySQL

I am trying to setup a multi-master type of replication with each master having an additional slave using tungstenTungsten. As an example, lets say I have 4 hosts (A,B,C,D) and Hostshosts A and C are the Mastersmasters, with B being a slave to A and D being a slave to C.

With my current configuration, I will add data to A. This gets replicated to it'sits slave B and to the other master C with no issue. The same happens with I add data to C, its slave D gets updated and the other master A gets updated. The problem is when A gets updated, D will not see the changes. I do not want A to update D, but rather have D get all of the updates from C, which would also have B get all of it'sits updates from A.

Here is the configuration script I have been working on.

MASTER1='master1-ca' #<-- 'A' from example
MASTER2='master2-va' #<-- 'C' from example
SLAVE1='slave1-ca'   #<-- 'B' from example
SLAVE2='slave2-va'   #<-- 'D' from example

./tools/tpm configure defaults  \
    --reset \
    --replication-user=tungsten \
    --replication-password=password \
    --home-directory=/home/tungsten/PCS_DB \
    --datasource-mysql-conf=/etc/mysql/my.cnf \
    $( cat ./cookbook/security.options ) \
    --start
 
./tools/tpm configure PCS_Multi \
    --masters=$MASTER1,$MASTER2 \
    --master-services=west,east \
    $( cat ./cookbook/security.options ) \
    --topology=all-masters

./tools/tpm configure west \
    --hosts=$MASTER1,$SLAVE1 \
    --slaves=$SLAVE1 \
    $( cat ./cookbook/security.options ) \
    --master=$MASTER1 

./tools/tpm configure east \
    --hosts=$MASTER2,$SLAVE2 \
    --slaves=$SLAVE2 \
    $( cat ./cookbook/security.options ) \
    --master=$MASTER2

./tools/tpm install

I have been looking through documentation and tutorials for a few days now and can't seem to figure out this last piece. I have tried to setup a relay from $MASTER1 to $SLAVE1 but since there is not a lot of documentation on setting up a relay (at least from what I could find) I do not know if I am doing it correctly (or if I should even be doing that in the first place).

MySQL Replication with Tungsten

I am trying to setup a multi-master type of replication with each master having an additional slave using tungsten. As an example, lets say I have 4 hosts (A,B,C,D) and Hosts A and C are the Masters, with B being a slave to A and D being a slave to C.

With my current configuration, I will add data to A. This gets replicated to it's slave B and to the other master C with no issue. The same happens with I add data to C, its slave D gets updated and the other master A gets updated. The problem is when A gets updated, D will not see the changes. I do not want A to update D, but rather have D get all of the updates from C, which would also have B get all of it's updates from A.

Here is the configuration script I have been working on.

MASTER1='master1-ca' #<-- 'A' from example
MASTER2='master2-va' #<-- 'C' from example
SLAVE1='slave1-ca'   #<-- 'B' from example
SLAVE2='slave2-va'   #<-- 'D' from example

./tools/tpm configure defaults  \
    --reset \
    --replication-user=tungsten \
    --replication-password=password \
    --home-directory=/home/tungsten/PCS_DB \
    --datasource-mysql-conf=/etc/mysql/my.cnf \
    $( cat ./cookbook/security.options ) \
    --start
 
./tools/tpm configure PCS_Multi \
    --masters=$MASTER1,$MASTER2 \
    --master-services=west,east \
    $( cat ./cookbook/security.options ) \
    --topology=all-masters

./tools/tpm configure west \
    --hosts=$MASTER1,$SLAVE1 \
    --slaves=$SLAVE1 \
    $( cat ./cookbook/security.options ) \
    --master=$MASTER1 

./tools/tpm configure east \
    --hosts=$MASTER2,$SLAVE2 \
    --slaves=$SLAVE2 \
    $( cat ./cookbook/security.options ) \
    --master=$MASTER2

./tools/tpm install

I have been looking through documentation and tutorials for a few days now and can't seem to figure out this last piece. I have tried to setup a relay from $MASTER1 to $SLAVE1 but since there is not a lot of documentation on setting up a relay (at least from what I could find) I do not know if I am doing it correctly (or if I should even be doing that in the first place).

Relaying changes to a slave from another master with Tungsten on MySQL

I am trying to setup a multi-master type of replication with each master having an additional slave using Tungsten. As an example, lets say I have 4 hosts (A,B,C,D) and hosts A and C are the masters, with B being a slave to A and D being a slave to C.

With my current configuration, I will add data to A. This gets replicated to its slave B and to the other master C with no issue. The same happens with I add data to C, its slave D gets updated and the other master A gets updated. The problem is when A gets updated, D will not see the changes. I do not want A to update D, but rather have D get all of the updates from C, which would also have B get all of its updates from A.

Here is the configuration script I have been working on.

MASTER1='master1-ca' #<-- 'A' from example
MASTER2='master2-va' #<-- 'C' from example
SLAVE1='slave1-ca'   #<-- 'B' from example
SLAVE2='slave2-va'   #<-- 'D' from example

./tools/tpm configure defaults  \
    --reset \
    --replication-user=tungsten \
    --replication-password=password \
    --home-directory=/home/tungsten/PCS_DB \
    --datasource-mysql-conf=/etc/mysql/my.cnf \
    $( cat ./cookbook/security.options ) \
    --start
 
./tools/tpm configure PCS_Multi \
    --masters=$MASTER1,$MASTER2 \
    --master-services=west,east \
    $( cat ./cookbook/security.options ) \
    --topology=all-masters

./tools/tpm configure west \
    --hosts=$MASTER1,$SLAVE1 \
    --slaves=$SLAVE1 \
    $( cat ./cookbook/security.options ) \
    --master=$MASTER1 

./tools/tpm configure east \
    --hosts=$MASTER2,$SLAVE2 \
    --slaves=$SLAVE2 \
    $( cat ./cookbook/security.options ) \
    --master=$MASTER2

./tools/tpm install

I have been looking through documentation and tutorials for a few days now and can't seem to figure out this last piece. I have tried to setup a relay from $MASTER1 to $SLAVE1 but since there is not a lot of documentation on setting up a relay (at least from what I could find) I do not know if I am doing it correctly (or if I should even be doing that in the first place).

Source Link

MySQL Replication with Tungsten

I am trying to setup a multi-master type of replication with each master having an additional slave using tungsten. As an example, lets say I have 4 hosts (A,B,C,D) and Hosts A and C are the Masters, with B being a slave to A and D being a slave to C.

With my current configuration, I will add data to A. This gets replicated to it's slave B and to the other master C with no issue. The same happens with I add data to C, its slave D gets updated and the other master A gets updated. The problem is when A gets updated, D will not see the changes. I do not want A to update D, but rather have D get all of the updates from C, which would also have B get all of it's updates from A.

Here is the configuration script I have been working on.

MASTER1='master1-ca' #<-- 'A' from example
MASTER2='master2-va' #<-- 'C' from example
SLAVE1='slave1-ca'   #<-- 'B' from example
SLAVE2='slave2-va'   #<-- 'D' from example

./tools/tpm configure defaults  \
    --reset \
    --replication-user=tungsten \
    --replication-password=password \
    --home-directory=/home/tungsten/PCS_DB \
    --datasource-mysql-conf=/etc/mysql/my.cnf \
    $( cat ./cookbook/security.options ) \
    --start
 
./tools/tpm configure PCS_Multi \
    --masters=$MASTER1,$MASTER2 \
    --master-services=west,east \
    $( cat ./cookbook/security.options ) \
    --topology=all-masters

./tools/tpm configure west \
    --hosts=$MASTER1,$SLAVE1 \
    --slaves=$SLAVE1 \
    $( cat ./cookbook/security.options ) \
    --master=$MASTER1 

./tools/tpm configure east \
    --hosts=$MASTER2,$SLAVE2 \
    --slaves=$SLAVE2 \
    $( cat ./cookbook/security.options ) \
    --master=$MASTER2

./tools/tpm install

I have been looking through documentation and tutorials for a few days now and can't seem to figure out this last piece. I have tried to setup a relay from $MASTER1 to $SLAVE1 but since there is not a lot of documentation on setting up a relay (at least from what I could find) I do not know if I am doing it correctly (or if I should even be doing that in the first place).