Import All MySQL Sql Dumps in a Folder
This command will import all the MySQL sql dumps in the current folder. You can use this to restore your backuped databases.
for i in *; do mysql -uroot `basename $i .sql` < $i; done
This command will import all the MySQL sql dumps in the current folder. You can use this to restore your backuped databases.
for i in *; do mysql -uroot `basename $i .sql` < $i; done
show routing table
route -n
Backup all files in /var/lib/mysql to another folder
To restore, stop mysqld if it is running
service stop mysqld
Move all database files back to /var/lib/mysql. Make sure that all the folder and files in that folder belongs to mysql
chown -R mysql.mysql /var/lib/mysql
Try starting mysql
service start mysqld