Skip navigation links

MySQL Forums :: Replication :: Problem setting up MySQL Replication


Advanced Search

Problem setting up MySQL Replication
Posted by: Mohammad Khan ()
Date: January 20, 2013 09:34AM

Hi All,

I am trying to setup MySQL replication environment.I Installed Server vsersion:5.5.29-ndb-7.2.10-cluster-gpl-log MySQL Cluster Community server on two separate windows 2003 machines.installed my database on both machines.Setup replication user.In mysql command line utility on mySLQ server1,ran the following commands:

change master to master_host='IP1',master_user='user1',master_password='PW1';

start slave;

On the second mysql server2, ran the commands:

change master to master_host='IP2',master_user='user1',master_password='PW1';

start slave;

However, when I run the following command on machine 1, I see:



mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: 10.0.0.71
Master_User: replication
Master_Port: 3306
Connect_Retry: 60
Master_Log_File:
Read_Master_Log_Pos: 4
Relay_Log_File: MySQLStreamA-relay-bin.000001
Relay_Log_Pos: 4
Relay_Master_Log_File:
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table: activevos.AeURNValues,activevos.AeCounter,activev
os.AeLock,activevos.AeMetaInfo
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 0
Relay_Log_Space: 112
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 1593
Last_IO_Error: Fatal error: The slave I/O thread stops because m
aster and slave have equal MySQL server ids; these ids must be different for rep
lication to work (or the --replicate-same-server-id option must be used on slave
but this does not always make sense; please check the manual before using it).
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 3
Master_Bind:
1 row in set (0.00 sec)

ERROR:
No query specified

mysql>

Similar error is seen in machine2 also.

I double checked that each of the mysql servers had unique server IDs.And I varified it using 'SHOW VARIABLES' command as well as from the .ini file. Also here are the replication settings in .ini file:

On machine1:

# If you're using replication with chained slaves (A->B->C), you need to
# enable this option on server B. It enables logging of updates done by
# the slave thread into the slave's binary log.
log_slave_updates

# *** Replication related settings


# Unique server identification number between 1 and 2^32-1. This value
# is required for both master and slave hosts. It defaults to 1 if
# "master-host" is not set, but will MySQL will not function as a master
# if it is omitted.
server-id = 3
replicate-same-server-id = 0
auto-increment-increment = 2
auto-increment-offset = 3

sync_binlog=1
log-bin = C:\mysql\log\log-bin.log # change this to a path/name appropriate to your system
relay-log=MySQLStreamA-relay-bin

And on machine2:

# If you're using replication with chained slaves (A->B->C), you need to
# enable this option on server B. It enables logging of updates done by
# the slave thread into the slave's binary log.
log_slave_updates

# *** Replication related settings


# Unique server identification number between 1 and 2^32-1. This value
# is required for both master and slave hosts. It defaults to 1 if
# "master-host" is not set, but will MySQL will not function as a master
# if it is omitted.
server-id = 4
replicate-same-server-id = 0
auto-increment-increment = 2
auto-increment-offset = 4

sync_binlog=1
log-bin = C:\mysql\log\log-bin.log # change this to a path/name appropriate to your system
relay-log=MySQLStreamB-relay-bin

It is not clear to me why I am seeing this error.

Am I missing soemthing?

Any suggestions on how I can resolve this problem?

Thanks.

Options: ReplyQuote


Subject Views Written By Posted
Problem setting up MySQL Replication 1391 Mohammad Khan 01/20/2013 09:34AM


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.