Posts Tagged With: table

Import All MySQL Sql Dumps in a Folder

Tagged with: , , , , , , , , , ,

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
No Comments »

Show routing table

Tagged with: , , , , ,

show routing table


route -n 
No Comments »

Backup All Databases in MySQL

Tagged with: , , , , , ,

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

1 Comment »