I'm having an odd problem while setting up one-way replication between
2 MySQL servers. The setup process seemed to go well, and when I
examine everything, like processlists on both servers and the master
and slave statuses, it all seems to be working fine. Whenever I make
an update to the master database, the binlog gets updated on both the
master and the slave. The relay log on the slave also seems to record
the change. The only problem is that there's no actual change in the
database!
The way it's acting almost makes me think that the I/O thread is
working ok, but the SQL thread isn't executing anything it receives.
As far as I can tell, though, the SQL thread is working ok. I know
it's running, and when I run "show processlist" it's status is listed
as "Slave: waiting for binlog update".
Also (and this may be the cause of the problem) when I run "show slave
hosts" on the master server it comes back with:
+-----------+---------------------------+------+-------------------+-----------+
| Server_id | Host | Port | Rpl_recovery_rank |
Master_id |
+-----------+---------------------------+------+-------------------+-----------+
| 1 | vmmysql02 | 3306 | 0 | 1
|
+-----------+---------------------------+------+-------------------+-----------+
I noticed that the Server_id and the Master_id are the same, so I
tried to change that in the my.cnf files for both servers. Afterwards,
I restarted, but it doesn't seem to have changed the server-ids.
Any help would be greatly appreciated.