i am new in mysql and trying to establish master master replication in mysql
on first server i have added these lines to mysqld section of my.cnf(mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1)
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-bin=/var/lib/mysql/mysql-bin.log
binlog-do-db=sample1
binlog-ignore-db=mysql
binlog-ignore-db=information_schema
binlog-ignore-db=test2
binlog-ignore-db=sample3
binlog-ignore-db=example3
binlog-ignore-db=endpoints
binlog-ignore-db=meetme
binlog-ignore-db=test
binlog-ignore-db=sample2
server-id=1
master-host = 192.xxx.x.xxx
master-user = abc
master-password = abc_pass
master-connect-retry = 60
relay-log = /var/lib/mysql/slave-relay.log
relay-log-index = /var/lib/mysql/slave-relay-log.index
On second server i have added these lines to mysqld section of my.cnf(mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (i486) using readline 6.1)
server-id=2
master-host = 192.xxx.x.xxx
master-user = xyz
master-password = xyz_pass
master-connect-retry = 60
relay-log = /var/lib/mysql/slave-relay.log
relay-log-index = /var/lib/mysql/slave-relay-log.index
log-bin = /var/lib/mysql/mysql-bin.log
binlog-do-db = sample1
binlog-ignore-db=mysql
binlog-ignore-db=information_schema
binlog-ignore-db=phpmyadmin
on first server slave status is
*************************** 1. row ***************************
Slave_IO_State: Connecting to master
Master_Host: 192.xxx.x.xx
Master_User: abc
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000001
Read_Master_Log_Pos: 36158
Relay_Log_File: slave-relay.000001
Relay_Log_Pos: 98
Relay_Master_Log_File: mysql-bin.000001
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 36158
Relay_Log_Space: 98
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
1 row in set (0.00 sec)
ERROR:
No query specified
On second server slave status is
*************************** 1. row ***************************
Slave_IO_State: Connecting to master
Master_Host: 192.xxx.x.xxx
Master_User: xyz
Master_Port: 3306
Connect_Retry: 60
Master_Log_File:
Read_Master_Log_Pos: 4
Relay_Log_File: slave-relay.000003
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:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 5
Exec_Master_Log_Pos: 0
Relay_Log_Space: 106
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: 1045
Last_IO_Error: error connecting to master 'abc@192.xxx.x.xxx:3306' - retry-time: 60 retries: 86400
Last_SQL_Errno: 0
Last_SQL_Error:
1 row in set (0.00 sec)
ERROR:
No query specified
Do'nt know why Slave_IO_Running is no.
i have tried a lot to start replication but i am still unable to start replication. i have also commented
#bind-address = 127.0.0.1
and
#skip-external-locking
i need your help. Please send your suggestions and solution for this problem.
Thanks in advance.
regards, pradeep