备份myisam表:需要时加上--default-character-set
set sql_log_bin=0
mysqldump -uroot -p123456 -S /mydata/data/mysql.sock -q --lock-all-tables --flush-logs --master-data=2 --tables backuptest teacher >/tmp/myisam.sql ;
set sql_log_bin=1
备份innodb表:需要时加上--default-character-set
set sql_log_bin=0
mysqldump -uroot -p123456 -S /mydata/data/mysql.sock -q --no-autocommit --flush-logs --single-transaction --master-data=2 --tables backuptest student >/tmp/innodb.sql;
set sql_log_bin=1