mysql打开binlog

修改mysql的配置文件,ubuntu下mysql的配置文件存放位置为:/etc/mysql/my.cnf

image

找到log_bin配置项,指定一个路径:

image

重启数据库:/etc/init.d/mysql restart

在数据库中进行update, insert和delete操作,会触发binlog:

image

原文地址:https://www.cnblogs.com/justinzhang/p/4777715.html