Recover data from ibdata and .frm files

Try the below procedure to recover data from MySQL ibdata and .frm files

1. Mount a flash drive to the crashed Saleculator and give below commands

mkdir /flash/data
mkdir /flash/data/SALECULATOR
cp -r /data/db/ibdata* /flash/data/
cp -r /data/db/SALECULATOR/ /flash/data/SALECULATOR/
umount /flash

2. Now mount this flash drive to a running Saleculator, and give below commands

mkdir /flash/data/SALECULATOR
cp -r /flash/data/ibdata* /data/db/
cp -r /flash/data/SALECULATOR/*.frm /data/db/SALECULATOR
chown -R mysql:mysql /data/db/SALECULATOR
service mysql restart

0 Comments

Leave a Reply

Arrow-up