Mysqldump all tables from database in separate files
From DevOps Notebook
#!/bin/bash
USER=myuser
PASSWORD=mypwd
DATABASE=nameofdb
for i in $(mysql -uUser -pPASSWORD DATABASE -e "show tables;"|grep -v Tables_in_);do mysqldump -u$USER -p$PASSWORD $DATABASE $i > /destination/dir/$i".sql";done
tar -cjvf "backup_mysql_"$(date +'%Y%m%d')".tar.bz2" /destination/dir/*.sql