HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

Master - master replication not working

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
notmasterworkingreplication

Problem

I configured two WAMP servers running on different machines for master-master replication. I am using a linksys router for the network. I created a wireless network, but one of the server boxes doesn't have a WIFI so I used cable to connect it to the router. After the configuration, everything seem to be okay, but the servers don't seem to connect with each other as slaves. Below is the server status.

Variable               Value
Slave_IO_State:        Connecting to master
Master_Host:           192.168.1.100
Master_User:           master
Master_Port:           3306
Connect_Retry:         60
Master_Log_File:       mysql-bin.000001
Read_Master_Log_Pos:   95849
Relay_Log_File:        Chibuzo-PC-relay-bin.000001
Relay_Log_Pos :        4
Relay_Master_Log_File: mysql-bin.000001
Slave_IO_Running:      Connecting
Slave_SQL_Running:     Yes
Replicate_Do_DB:       ticket
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:    95849
Relay_Log_Space:    107
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:


Running the following query on server 1 with IP address 192.168.1.102, I got the following result

SELECT user, host FROM mysql.user WHERE Repl_slave_priv = 'Y';

+-----------+-------------------------+
| User      | host                    |
+-----------+-------------------------+
| root      | localhost               |
| root      | 127.0.0.1               |
| root      | ::1                     |
| master    | 192.168.1.100           |
+-----------+-------------------------+


For server 2 with IP 192.168.1.100

```
+-----------+-------------------------+
| User | host |
+-----------+-----------

Solution

In your Error Log :

[ERROR] Slave I/O: error connecting to master 'master@192.168.1.100:3306' - retry-time: 60  retries: 86400, Error_code: 2003


Error_code: 2003 : The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.

Try to connect from one server to the other with your "master" account :

On 192.168.1.100 :

mysql -h 192.168.1.102 -u master -p


On 192.168.1.102 :

mysql -h 192.168.1.100 -u master -p


Check, your firewall, try to ping and other stuff in relation to network communication...

Max.

Code Snippets

[ERROR] Slave I/O: error connecting to master 'master@192.168.1.100:3306' - retry-time: 60  retries: 86400, Error_code: 2003
mysql -h 192.168.1.102 -u master -p
mysql -h 192.168.1.100 -u master -p

Context

StackExchange Database Administrators Q#31230, answer score: 6

Revisions (0)

No revisions yet.