(2)BINLOG 二进制日志包含了所有更新了数据或者已经潜在更新了数据(例如,没有匹配任何 行的一个DELETE)的所有语句。语句以“事件”的形式保存,它描述数据更改; root@kallen:/# mysqlbinlog log-file
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
mysqlbinlog: File 'log-file' not found (Errcode: 2)
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; ddkosooodfdsfsfs
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
root@kallen:/#
root@kallen:~# mysqldumpslow /var/log/mysql/mysql-slow.log
Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 1 Time=0.88s (0s) Lock=0.00s (0s) Rows=0.0 (0), debian-sys-maint[debian-sys-maint]@localhost
select count(*) into @discard from `information_schema`.`COLUMNS`
Count: 1 Time=0.16s (0s) Lock=0.00s (0s) Rows=35.0 (35), debian-sys-maint[debian-sys-maint]@localhost
select concat('S',
TABLE_SCHEMA, 'S', TABLE_NAME, 'S')
from information_schema.TABLES where ENGINE='S'
root@kallen:~#