MySQL binlog
表结构 CREATE TABLE `t` ( `id` int(11) NOT NULL AUTO_INCREMENT, `col1` int(10) unsigned DEFAULT NULL, `col2` varchar(45) DEFAULT NULL, `col3` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 mysql 版本 ➜ ~ mysql -V mysql Ver 14.14 Distrib 5.7.15, for osx10.11 (x86_64) using EditLine wrapper mysql的安装请看 https://my.oschina.net/xinxingegeya/blog/751154 启动mysql的binlog,在配置文件中添加, [mysqld] # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. log_bin = mysql-bin # These are commonly set, remove the # and set