Sunday, July 23, 2017

MySQL crash recovery - ibdata1 file

It proved to me working in my case:

If you don't have backup.
I think the recommended way to recover that databases is start MySQL with innodb_force_recovery = 4 (or higher values) and dump the databases to a SQL.Then drop it and recover from backup. Instead of dropping the original database I prefer to create the new databases with another name or in another server and check the content first.
STEPS TO BE FOLLOWED
  1. In mysqld section of my.cnf add a line innodb_force_recovery = 4 and then restart MySQL server using /etc/init.d/mysql restart.
  2. Take backup.
  3. Restore it on other server and verify the contents.
Please also have a look at Forcing InnoDB Recovery.
UPDATE : For your comment how to progress on that so that it would not happen again
You should not kill MySQL it is not a good practice that may cause MySQL server to crash,whenever you make any configuration changes you should proceed as follows.
  1. Safely stop MySQL Server using /etc/init.d/mysql stop
  2. Make changes
  3. Restart MySQL Server

3 comments:

  1. Byrecover-my-files It's been shown that the more time a person spends on a website, the greater the likelihood he or she will convert. So the next time someone lands on your site as the result of a Google search, put your best foot forward by offering great design and quality content.

    ReplyDelete
  2. other than the one on which your files were lost.Run search your drive and preview the files found in the results screen. http://activatetool.com

    ReplyDelete
  3. CRM in the broader sense encompasses not only customer relationship management itself but how customer relationship management is handled and the most important elements of a CRM program that are essential to its being successful. SugarCRM Philippines

    ReplyDelete

PSR-1 and PSR-2 coding standards for PHP

Visual aspects of code play a significant role in raising or drowning developer's productivity. In case that there's too much clutte...