Reputation: 18158
I have set up MySQL master/slave replication for 2 servers before without problems, I usually follow the great documentation on the MySQL website here. However this time I have set it up and everything looks like it should be working, but the slave is not updating with new data from the master. I will show some output from both the master and the server.
Master (IP:10.1.1.21)
show processlist
'107', 'repl', '10.1.1.22:60686', NULL, 'Binlog Dump', '523', 'Has sent all binlog to slave; waiting for binlog to be updated', NULL
show master status
'mysql-bin.000280', '10494', 'joomla', 'mysql'
Slave (IP:10.1.1.22)
show processlist
'9', 'system user', '', NULL, 'Connect', '625', 'Waiting for master to send event', NULL
'10', 'system user', '', NULL, 'Connect', '10', 'Has read all relay log; waiting for the slave I/O thread to update it', NULL
show slave status
'Waiting for master to send event', '10.1.1.21', 'repl', '3306', '60', 'mysql-bin.000280', '14029', 'tim-Dell-DM061-relay-bin.000002', '14174', 'mysql-bin.000280', 'Yes', 'Yes', '', '', '', '', '', '', '0', '', '0', '14029', '14338', 'None', '', '0', 'No', '', '', '', '', '', '0', 'No', '0', '', '0', ''
The way I tested to see if it was working was to create a table on the master. I did this and this new table did not propagate to the slave. I did check the relay binary log, and it did have a lot of updates in it. This is a website database, and I just checked it the # of hits are propagating to the slave, so it seems to be working a little.
Creating a table is not propagating, and also i tried inserting some data into a test table that existing when I did the initial data sync to the slave, this does not propagate to the slave either.
Any ideas of how I can debug this further??
Thanks!
EDIT:
the show global variables like 'replicate%'
returns 2 columns: "Variable_name", "Value". There aren't any rows of data.
Upvotes: 3
Views: 32032
Reputation: 111
Apparently your bin position on the master is currently 10494 and your slave sees your Read_Master_Log_Pos as 14029.
So your slave thinks it is ahead of the master in log position, and waiting for the master to have new data.
Upvotes: 8
Reputation: 44333
In our SHOW MASTER STATUS;
I noticed you have this
'mysql-bin.000280', '10494', 'joomla', 'mysql'
I cringe when someone uses binlog-do-db. Here is why.
There is an old bug report for MySQL 4.0 that I do not fully believe was fixed.
Upvotes: 7