0

It appears overnight our Master RDS mysql server went offline for 3-4 minutes. When it came back online the replication was broken.

On the slave, issuing SHOW SLAVE STATUS\G;

"Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'"

In AWS monitoring, slave lag shows "-1.0".

Is there a way to get the slave replication restarted, or should I just create a new slave?

jaredsten
  • 203
  • 1
  • 7

1 Answers1

0

There's really no harm in just spooling up a new slave, so I'd go that route.

ceejayoz
  • 32,910
  • 7
  • 82
  • 106
  • I am in this situation and want to _replace_ the malfunctioning replica. The problem is the hostname: can I rename the old replica to something, and then rename the new one to the old one's name, and keep the same hostname as before? Is there anything I need to be aware of? Can something go terribly wrong? – FrontierPsycho Jun 17 '15 at 14:30
  • @FrontierPsycho You can promote a replica to master, but I don't think you can promote a replica to another replica's spot. We use DNS for this - our master is `db.internal.example.com`, our read-replica is `read-db.internal.example.com`, so switching replicas is just a Route53 record change. – ceejayoz Jun 17 '15 at 14:33
  • That's a better way to do it, although we're using the internal RDS hostname currently, and I'd like to avoid having to change that everywhere it's used. I guess I'll try it and see. – FrontierPsycho Jun 17 '15 at 14:54