fosiul01
asked on
need help to understand problem in 4 node replication
Hi
I got 4 node replication.
2 is outside of my network and 2 is inside of my network
Same as this one
http://onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html?page=3
4 way replication...
There is not any error on any Slave/Master Server.
All node is looking to each other without any error, I have checked Master log position is correct.
but i am having wired problem ( glad its still on test mode!!)
If i create any table on node D
it will copy to node A, nodeB,
but it would not copy to nodeC
if i create any table on node A,
it will copy to node B,but
it would not copy to nodeC, since it does not copy to nodeC, it does not go to node D
if i create a table on nodeb, it will copy to node C, but it would not copy to nodeD, since it does not copy to node D, it will not copy to node A
i am fu....... up
Here, nodeA and node B is outside of network,
and node C and node D is inside of my network
Nat and port forward to node C, as this is the master of node B....
where is the problem........
i am not sooo confused...
thank
ASKER
Glad to see you!!
having teething problem with this set-up!!
i m acreating
use database;
create table nodeD (id int);
just to test
what does it mean :
Make sure on node B that you have the slave transaction logged into the binary log.
what does it mean ??
I think you need to add the log-bin in the slave section as well as in the master section.
let me give you my my.cnf
i have bellow setup to every server
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
binlog-do-db=fosiul
binlog-do-db=hesk
binlog-do-db=serviceloan
binlog-do-db=sharp
binlog-do-db=swapout
binlog-ignore-db=mysql
binlog-ignore-db=test
# binary logging format - mixed recommended
binlog_format=mixed
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 2
master-host = xxxxxxxx
master-user =xxxxx
master-password = xxxxx
master-port = 3306
auto_increment_increment= 2
auto_increment_offset = 2
i just c hange ServerId and auto_increment_offset to different
also just realized
log_slave_updates is missing from 3 server!!let me add log_slave_updates , then see what happpended
will be back after 1 and half hour
time go go home
having teething problem with this set-up!!
i m acreating
use database;
create table nodeD (id int);
just to test
what does it mean :
Make sure on node B that you have the slave transaction logged into the binary log.
what does it mean ??
I think you need to add the log-bin in the slave section as well as in the master section.
let me give you my my.cnf
i have bellow setup to every server
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
binlog-do-db=fosiul
binlog-do-db=hesk
binlog-do-db=serviceloan
binlog-do-db=sharp
binlog-do-db=swapout
binlog-ignore-db=mysql
binlog-ignore-db=test
# binary logging format - mixed recommended
binlog_format=mixed
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 2
master-host = xxxxxxxx
master-user =xxxxx
master-password = xxxxx
master-port = 3306
auto_increment_increment= 2
auto_increment_offset = 2
i just c hange ServerId and auto_increment_offset to different
also just realized
log_slave_updates is missing from 3 server!!let me add log_slave_updates , then see what happpended
will be back after 1 and half hour
time go go home
ASKER
Ok solved!! problem was as i said
Log_slave_updates was missing from 3 server!!
So Log_slave_updates was in Node A,
but was missing from Node b,c,d
so when i created table on nodeA,
since node A is the master for nodeB, it was copied to nodeB, and since log_slave_update was not present to nodeB, it would not write into its binlog (i guess) , so it would not copy to node C,
when i created table on node D,
since it was the master for node A, tabled copied to node A, and node A is the master for nodeB, so it was copped to node B, but agian node c, did not!!!
so its done
but tel me one thing
Suppose node C died. so i need to join node d with node B
in that case, what i do ?? just tell to read current master log position from node b ??( since node B would not master for n ode D)
or do i have to reset slave in node d ???
whats the procedure??
Log_slave_updates was missing from 3 server!!
So Log_slave_updates was in Node A,
but was missing from Node b,c,d
so when i created table on nodeA,
since node A is the master for nodeB, it was copied to nodeB, and since log_slave_update was not present to nodeB, it would not write into its binlog (i guess) , so it would not copy to node C,
when i created table on node D,
since it was the master for node A, tabled copied to node A, and node A is the master for nodeB, so it was copped to node B, but agian node c, did not!!!
so its done
but tel me one thing
Suppose node C died. so i need to join node d with node B
in that case, what i do ?? just tell to read current master log position from node b ??( since node B would not master for n ode D)
or do i have to reset slave in node d ???
whats the procedure??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
when you create a table to you use
create table database.tablename?
or do you use
create table tablename?
Make sure on node B that you have the slave transaction logged into the binary log.
The same should be checked on C.
I think you need to add the log-bin in the slave section as well as in the master section.