replication

2 many dots can break your replication only once

Two or more dots in your relay log or binary log names can break replication; but worry not, it will only do it once. If you request to start again, it will work. That’s it, that’s the blog. Should you choose to spend some more time, go ahead. A new MySQL 5.7 GTID replication chain was being constructed and fail-overs were being tested while an oddity of MySQL replication revealed itself. The Orchestrator graceful fail-over was not able to attach the replica and reporting an error. Every possibility was investigated:

Galera cluster to AWS Aurora migration & HA_ERR_FOUND_DUPP_KEY

In this post we will see a case study of a Galera Cluster migration to AWS Aurora and quick solution to the replication issue. A friend received an error in a Master-Master replication as follows: Could not execute Write_rows event on table _database._table; Duplicate entry ’65eJ8RmzASppBuQD2Iz73AAy8gPKIEmP-2018-08-03 08:30:03′ for key ‘PRIMARY’, Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event’s master log mysql-bin-changelog.000010, end_log_pos 1107814 We talked about it and I immediately started blabbering cons of writing on both masters, how to handle, roles of apps and so on. He intervened and revealed, it is Galera Cluster replicated to Aurora and he is...

MySQL master master replication monitor with php code

For monitoring replication we know a lot of tools and codes – but this one is different because I wrote it 😉 Well this is fairly simple php code for monitoring a master master replication setup. It requires a single shared login id available on both MySQL servers. It will display in tabular format following details: File: Present binary log Position: Binary log position Io run: Slave IO Thread Running status Sql run: SQL Thread Running status ErrorNum: Error number ErrorMeg: Error message You can easily stop / start each server’s slave (STOP SLAVE / START SLAVE) with a single...

Monitor multiple mysql replication using php: Updated

Monitoring a replication is an important aspect. As replication includes multiple nodes, it is essential to track activity and status across all mysql servers involved in replication. To monitor replication we know commands like: Show slave status; Show master status; Refer: http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-replication.html But when it comes to non-gui interface, it becomes little tedious. With some efforts, I managed to make a php script to monitor mysql servers. It can: Get per second status of slaves. Start / Stop slave from any of the mysql servers in replication. Display error number along with description in case of error in replication. Shows...