1. 按照原历史表新增一个新表(空表):
mysql> create table history_log_new ...;
2. 给历史表重命名,并将新表重命名为历史表:
mysql> RENAME TABLE history_log to history_log_20151217, history_log_new to history_log;
mysqldump -uroot -p -h --databases --tables user --where='' > 导出数据
3:查看binlog日志
mysqlbinlog --start-datetime='2017-12-08 04:56:02' --stop-datetime='2017-12-08 04:56:10' --base64-output=decode-rows -v mysql-bin.000264