mysql recovery

A tale of Corrupt InnoDB table, MySQL crash & recovery

I’m going to narrate you a story that happened around a crashing MyQL, Corrupted InnoDB table and finally the recovery by table restore. We will see how our database administrator detected the issue and what he did to resolve it. A day in MySQL Database Consultant’s day was taking its shape while a friend called for help. Friend: Hey, my mysql is crashing and website isn’t functioning well. Everything is down. Can you help me? Our database admin quickly jumps in and checks for the MySQL error log. 2018-01-01T07:39:03.173398Z 0 [ERROR] InnoDB: Database page corruption on disk or a failed...

Restore / Recover dropped MySQL database from binary logs

In this post I will share a recovery scenario of a MySQL database restore from the binary logs. Recently someone accidentally dropped an important MySQL database and the backup was not present! As we know the the binary log contains DMLs to table data and that’s where our hope lies. Luckily the binary log retention period (expire_logs_days) was set to 30 days and the CREATE DATABASE was still present in the binary logs. Thus this restore of the dropped MySQL database can be done from extracting respective DMLs point-in-time. Here we will play the binary logs against a temporary MySQL...