MySQL-Articles

mysql database backup shell script with status email

This post is for the backup script for MySQL database on Linux with mail. It’s a linux shell script for taking logical backup using mysqldump and sending status email. The backup shell script works as follows: – The script takes backup using mysqldump and compresses it. – Upon success, it will attempt to ship the backup to specified offsite location. – Upon detecting failure in any of the above step, it will send out failure email. – Upon overall success, it will sendout success email with execution time and present backups list. You might be looking for setting up physical...

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...