做mysql主从
见前两篇博客
1
数据库备份shell脚本
[root@localhost ~]# vim /shell/backup_mysql.sh
#!/bin/bash
date=date +%Y-%m-%d
database=mysql -uroot -p123456 -e "show databases;" | grep -v Database
for db in d a t a b a s e d o [ − d / o p t / database do [ -d /opt/