![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I studiously followed the documentation on replication and set up replication. The master and slave are connected by a VPN and the transaction load is very low (50 trans/hour). The error log contains [ERROR] Slave I/O: error connecting to master 'repl (AT) 192 (DOT) 168.10.101:3306 where change mast to master_host ='192.168.10.101', master_user ='repl', master_password='thePassword', master_log_file='mysql-bin.000001', master_log_pos=106; I do have a user on the master named repl (AT) localhost (DOT) |
#3
| |||
| |||
|
|
The error log contains [ERROR] Slave I/O: error connecting to master 'repl (AT) 192 (DOT) 168.10.101:3306 I do have a user on the master named repl (AT) localhost (DOT) |
#4
| |||
| |||
|
|
bill <will... (AT) TechServSys (DOT) com> wrote: The error log contains [ERROR] Slave I/O: error connecting to master 'r... (AT) 192 (DOT) 168.10.101:3306 I do have a user on the master named repl (AT) localhost (DOT) The user must be created on the master, the user name must be repl@'slave-ip-address' and it needs the replication slave privilege. Besides that replication uses the normal MySQL protocol, so you can use any MySQL client to test the connection. I.e. mysql -h 192.168.10.101 -u repl -p (to be run on the slave, of course) XL |
#5
| |||
| |||
|
|
On Jul 28, 5:00=A0am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote: ... replication uses the normal MySQL protocol, so you can use any MySQL client to test the connection. I.e. mysql -h 192.168.10.101 -u repl -p I created a user on the master (which is 192.168.10.101) named 'repl (AT) 192 (DOT) 168.0.200' (the slave ip address) and verified that it in the master's user file. |
|
but trying (from 192.168.0.200) mysql -h 192.168.10.101 -u repl -p gets me: ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.10.101' (111) |
#6
| |||
| |||
|
|
bill <william (AT) TechServSys (DOT) com> wrote: On Jul 28, 5:00=A0am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote: ... replication uses the normal MySQL protocol, so you can use any MySQL client to test the connection. I.e. mysql -h 192.168.10.101 -u repl -p I created a user on the master (which is 192.168.10.101) named 'repl (AT) 192 (DOT) 168.0.200' (the slave ip address) and verified that it in the master's user file. OK but trying (from 192.168.0.200) mysql -h 192.168.10.101 -u repl -p gets me: ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.10.101' (111) $perror 111 OS error code 111: Connection refused |
|
The TCP connection was refused. Firewall? Or maybe a VPN configuration issue? Looks not like a MySQL problem. |
| XL |
#7
| |||
| |||
|
|
On Jul 28, 5:00 am, Axel Schwenke<axel.schwe... (AT) gmx (DOT) de> wrote: bill<will... (AT) TechServSys (DOT) com> wrote: The error log contains [ERROR] Slave I/O: error connecting to master 'r... (AT) 192 (DOT) 168.10.101:3306 I do have a user on the master named repl (AT) localhost (DOT) The user must be created on the master, the user name must be repl@'slave-ip-address' and it needs the replication slave privilege. Besides that replication uses the normal MySQL protocol, so you can use any MySQL client to test the connection. I.e. mysql -h 192.168.10.101 -u repl -p (to be run on the slave, of course) XL XL, thanks, but... I created a user on the master (which is 192.168.10.101) named 'repl (AT) 192 (DOT) 168.0.200' (the slave ip address) and verified that it in the master's user file. but trying (from 192.168.0.200) mysql -h 192.168.10.101 -u repl -p gets me: ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.10.101' (111) next suggestion ? |
#8
| |||
| |||
|
|
Axel Schwenke wrote: bill <william (AT) TechServSys (DOT) com> wrote: On Jul 28, 5:00=A0am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote: ... replication uses the normal MySQL protocol, so you can use any MySQL client to test the connection. I.e. mysql -h 192.168.10.101 -u repl -p I created a user on the master (which is 192.168.10.101) named 'repl (AT) 192 (DOT) 168.0.200' (the slave ip address) and verified that it in the master's user file. OK but trying (from 192.168.0.200) mysql -h 192.168.10.101 -u repl -p gets me: ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.10.101' (111) $perror 111 OS error code 111: Connection refused That merely means the SYN packet got to the socket, and there was nothing registered to listen for it. Whilst that behaviour CAN be a firewall, its more likely that mysqld simply isnt listening at the far end. Firewalls are more likely to simply send nothing back at all. In which case you get a timeout, not a connection refused. The TCP connection was refused. Firewall? Or maybe a VPN configuration issue? Looks not like a MySQL problem. It could be. mysqld - at least in my setups - is not configured to listen on ip ports other that 127.0.0.1 or to remote requests. |
| XL |
#9
| |||
| |||
|
|
bind-address (should NOT be set or should be set to the remote's ip address). |
#10
| |||
| |||
|
|
On Fri, 29 Jul 2011 17:04:12 -0400, Jerry Stuckle jstucklex (AT) attglobal (DOT) net> wrote: bind-address (should NOT be set or should be set to the remote's ip address). Are you sure? I would expect it should be set (in this use case) to either 0.0.0.0 (=listen on all interfaces) or 192.168.10.101 (=listen on the interface the partner tries to connect to). Best regards, |
![]() |
| Thread Tools | |
| Display Modes | |
| |