mysqldump -uroot -p --all-databases --flush-privileges --single-transaction --flush-logs --triggers --routines --events --hex-blob > 名字.sql mysqldump -uroot -p123456 --default-character-set=utf8 -q --flush-privileges --single-transaction --master-data=1 --flush-logs --routines --triggers --events --hex-blob -E -R -B testdb | gzip > ${backupdir}/${dateDIR}/mysql_back_${i}_${dateDIR}.sql.gz
mysqldump -uroot -pRCR8mGxnaNsb --opt -B -R -E -F --single-transaction --master-data=2 --default-character-set=utf8 --set-gtid-purged=off TM_MiniTrademark > TM_MiniTrademark.sql
mysqlbinlog --base64-output=decode-rows -v --start-date='2014-09-16 14:00:00' --stop-date='2014-09-16 14:20:00' /opt/mysql/log/mysql-bin.000017 >/opt/mysql_bak/mysqlbinlogsql_restore_2014091614.sql
mysqlbinlog mysql-bin.000030 -d yourdbName > yourdbName_binlog.sql