Skip to content

Instantly share code, notes, and snippets.

@rushipkar90
Created January 8, 2016 04:29
Show Gist options
  • Save rushipkar90/4daedbf9f207ebb19530 to your computer and use it in GitHub Desktop.
Save rushipkar90/4daedbf9f207ebb19530 to your computer and use it in GitHub Desktop.
To recover the all the innodb databases from MysqlDump - restoreinnnodb.sh
#/bin/bash
for i in `cat /usr/local/src/innodb_databases-08012016.txt`; do
echo $i;
echo "/var/lib/mysql/$i"
#ls -la /home/mysqlbackup/$i.sql
mv /var/lib/mysql/$i /home/sachinn/mysqlrestore;
mysqladmin create $i;
mysql $i < /home/mysqldump-08012016/$i.sql;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment