We have been told many times that modifying live database should
be done with extreme care, we should always make a backup before
doing something big to the database. However, there are countless
stories on the Internet about losing data due to various reason,
one of them is forgetting to create a backup (Gitlab is an
example: https://about.gitlab.com/2017/02/01/gitlab-dot-com-database-incident/).
I was facing the same issue when upgrading MySQL server to a new
version. Luckily I was able to restore most of the data but it
was still a very good lesson for me. One of lesson I learned is
how we could restore the data from the *.ibd
and
*.frm
file.
The database I worked with had many tables. There were about 5 of them using MyISAM engine while others were using InnoDB engine. I was asked to upgrade …
[Read more]