MySQL Forums :: Replication :: MySQL Circular Replication


Advanced Search

MySQL Circular Replication
Posted by: Ryan Moat ()
Date: July 13, 2007 01:05PM

I'm currently setting up two MySQL Servers that are both a MASTER and SLAVE to each other(soon to be four) behind two Load Balancers. However, I cannot get the MASTER/SLAVE configuration to work correctly.

At first it was only doing a One-way replication, but we need it to be able to go both ways. Now after trying to fix some settings it does not work at all.

The SLAVE_IO_STATE is stuck on: SLAVE_IO_STATE: Connecting to Master, on both machines.

Here is our setup for both machines:

Node #1 - ILOD335LDN1J179
/etc/mysql/my.cnf

# for replication
server-id=1
log-bin
log-slave-updates
replicate-same-server-id=0
auto_increment_increment=2
auto_increment_offset=1
master-host=192.168.13.254
master-user=administrator
master-password=password
master-port=3306
report-host=ILOD335LDN1J179
skip_slave-start

log-slow-queries = /usr/var/mysql-slow.log
# log-queries-not-using-indexes
log-slow/admin-statements

[mysql.server]
user=administrator
basedir=/usr

Everything else is exactly the same on the second node, only the following is/should be different like it is supposed to:

Node 2 - ILOD249LDN1D056
server-id=2
auto_increment_increment=2
auto_increment_offset=2

The rest is the same.

Then under MySQL, I ran these commands:

GRANT REPLICATION SLAVE ON *.* TO 'administrator'@'%' IDENTIFIED BY 'password';
GRANT REPLICATION CLIENT ON *.* TO 'administrator'@'%';
GRANT SUPER ON *.* TO 'administrator'@'%';
GRANT RELOAD ON *.* TO 'administrator'@'%';
GRANT SELECT ON *.* TO 'administrator'@'%';

On one machine we put this in:

mysql>CHANGE MASTER TO MASTER_HOST = 'ILOD335LDN1J179',
->MASTER_USER='administrator',
->MASTER_PASSWORD='password',
->MASTER_LOG_FILE='ILOD335LDN1J179-bin.000017'
->MASTER_LOG_POS=14014

mysql> START SLAVE;

then on the other machine we put this in:
mysql>CHANGE MASTER TO MASTER_HOST = 'ILOD249LDN1D056',
->MASTER_USER='administrator',
->MASTER_PASSWORD='password',
->MASTER_LOG_FILE='ILOD335LDN1J179-bin.000014'
->MASTER_LOG_POS=14014

mysql> START SLAVE;

When typing: SHOW SLAVE STATUS \G

It shows that on both machines the IO_SLAVE is not working correctly:
SLAVE_IO_STATE: Connecting To Master
SLAVE_IO_Running: No
SLAVE_SQL_Running: Yes

When I setup the Debian machines, I named the machines:
ILOD249LDN1D056.<domainhere>.com
ILOD335LDN1J179.<domainhere>.com

Do I need to add the .<domainhere>.com to the end of my hostname when enter them with the command CHANGE MASTER TO MASTER_HOST? Or can I just type their IP addresses there?

Other than that, the SLAVE_IO_STATE is constantly at: Connecting to master and SLAVE_IO_Running: No.

I'm not sure what is wrong. We also disabled SELinux on both machines.

Any ideas? I'd appreciate it.

Thanks,
Ryan M.

Options: ReplyQuote


Subject Views Written By Posted
MySQL Circular Replication 10482 Ryan Moat 07/13/2007 01:05PM
Re: MySQL Circular Replication 3200 Ryan Moat 07/19/2007 12:59PM
Re: MySQL Circular Replication 4947 Subhanshu Gupta 07/25/2007 01:40PM
Re: MySQL Circular Replication 2933 Eric Brunson 08/28/2007 10:48AM
Re: MySQL Circular Replication 2579 Eric Bergen 08/28/2007 05:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.