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:
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 'firstname.lastname@example.org:3306' -retry-time: 60 retries 8640
I also see the following that seem to indicate the same problem:
Slave_IO_State: Connecting to master
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.
Edited 1 time(s). Last edit at 01/18/2013 09:57AM by Ryan Allen.