The Setup: An EC2 instance running MySQL 5.6 locally replicating to RDS MySQL. The VPC IP address range is 172.0.0.0/8.
Somehow the slave got out of sync and I'm getting this error when I do SHOW SLAVE STATUS:
Could not execute Update_rows event on table db37708.general; Can't find record in 'general', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log newprod.000106, end_log_pos 285712203
I compared the master and slave tables and yes, there is some data out of sync. Not schema, just text data. Okay, fine, I'll just run my script that wraps pt-table-checksum and I get this:
[ubuntu@fabersubuntu utils ]$ ./checksumSpecificTable.sh db37708 general
Replica ip-10-3-2-119 is stopped. Waiting.
Replica ip-10-3-2-119 is stopped. Waiting.
^C# Caught SIGINT.
TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE
04-19T12:09:50 0 0 1 1 0 32.282 db37708.general
So I run the script again after adding PTDEBUG=1 to it and I see things like this:
# DSNParser:1638 30974 DBI::db=HASH(0x21aae58) SET @@SQL_QUOTE_SHOW_CREATE = 1/*!40101, @@SQL_MODE='NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION'*/
# DSNParser:1652 30974 DBH info: DBI::db=HASH(0x21aae58) $VAR1 = {
# '@@hostname' => 'ip-10-3-2-119',
# 'CONNECTION_ID()' => '351452',
# 'DATABASE()' => undef,
# 'VERSION()' => '5.6.40-log'
My questions are:
Where is this "hostname" coming from? Assuming it's an IP address format, it makes sense that it is waiting because I don't have any hosts in a 10.0.0.0 range.
If I
CALL mysql.skip_repl_error
, I get another error; apparently I have lots of errors all of a similar type (so far). I assume pt-table-checksum can't do anything for me if replication isn't working, so what would be next step be other than rebuild my RDS slave?