Recover Broken Mysql Innodb Database

recover mysql innodb

This tutorial can be used to recover data from broken mysql, for example if you get error

or any other

first of all I recommending and it’s very important to create copy of mysql directory, for example if it’s in¬†/var/lib/mysql/ copy mysql to mysql2 to have backup, now open my.cnf

and in [mysqld] add

now try to start mysql if no success change

after this we will need to create dump of mysql db which we need

you should try this on both innodb_force_recovery 1 and 4 if we get dump file, stop mysql create new directory in /var/lib/ for example mysqlnew and open my.cnf for editing

change datadir to your folder

and remove

now start mysql normally it will create new db in mysqlnew folder, so there will not be old db, we should create user and db

now we should import our mysql dump in created db

Now you should have old db imported.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge