Skip navigation links

MySQL Forums :: Replication :: Replication: Connecting Slave and Master


Advanced Search

Replication: Connecting Slave and Master
Posted by: Ryan Allen ()
Date: January 18, 2013 09:55AM

I have two OpenSUSE11.4 VMs installed on my host machine, and both have mysql installed. Independently, the databases seem to be functioning as they should. My point for having the two VMs is to simulate two remote servers with mysql databases that are set up in a master/slave configuration.

I have followed the instructions here: http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html as best I could. I also referred to this guy's site-point page when things went amiss: http://www.sitepoint.com/mysql-master-slave-replication-starting-replication/.
This guy appears to have the same issue, but it wasn't resolved: http://forums.mysql.com/read.php?26,514323,514323#msg-514323

I am using virtual box for my VMs, and they are set up in a host-only network. I disabled the DHCP server in my virtualbox host-only adapter, so I gave each VM an ip like this:

for the master: ifconfig eth0 192.168.56.101 netmask 255.255.255.0 up
for the slave: ifconfig eth0 192.168.56.102 netmask 255.255.255.0 up

Now they can ping each other with those ip's. I started my mysql server on each VM, and on both ran:

SHOW PROCESSLIST;

It shows these three processes:

Id | User | Host | db | Command | Time | State | Info
==========================================================================================================================================
1 | system user | | NULL | Connect | 623 | Slave has read all relay log; waiting for the slave I/O thread to update it | NULL
2 | system user | | NULL | Connect | 623 | Connecting to master | NULL
3 | root | localhost | NULL | Query | 0 | NULL

The Connecting to master process is what I'm worried about. It never connects, just spins like that forever, and nothing is being replicated. When I run on the slave VM:

SHOW SLAVE STATUS;

I see Last_IO_Errno 2003, and Last_IO_Err "error connecting to master 'root@192.168.56.101:3306' -retry-time: 60 retries 8640
I also see the following that seem to indicate the same problem:

Slave_IO_State: Connecting to master
Slave_IO_Running: Connecting
Slave_SQL_Running: Yes
Master_SSL_Allowed: No

I just noticed this as well: The Master_Server_Id from the above is reported as 0, although in my.cnf files I defined it as 101 for the master and 102 for the slave. I was told to put them in /etc/ is that the wrong spot?

I appreciate anyone's help with this one.

-Ryan



Edited 1 time(s). Last edit at 01/18/2013 09:57AM by Ryan Allen.

Options: ReplyQuote


Subject Views Written By Posted
Replication: Connecting Slave and Master 1382 Ryan Allen 01/18/2013 09:55AM
Re: Replication: Connecting Slave and Master 462 Scott Nemes 01/18/2013 10:53AM
Re: Replication: Connecting Slave and Master 443 Ryan Allen 01/18/2013 11:15AM
Re: Replication: Connecting Slave and Master 501 Scott Nemes 01/18/2013 11:20AM
Re: Replication: Connecting Slave and Master 537 Ryan Allen 01/18/2013 12:22PM
Re: Replication: Connecting Slave and Master 487 Scott Nemes 01/18/2013 12:32PM


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.