mysql 开启binlog
1.修改配置文件
vi /etc/mysql/mysql.conf.d/mysqld.cnf
server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
bind-address xxx //注意:如果本地可以连接,外部无法访问,可以修改该字段为IP
2.重启服务
sudo service mysql restart
3.查看是否启用
mysql>show variables like 'log_bin';
4.binlog查看
mysqlbinlog --base64-output=DECODE-ROWS -v mysql-bin.000001
5.其他binlog查看工具
https://www.sohu.com/a/127270859_610509
相关链接
https://www.fujieace.com/mysql/bin-log.html
https://www.cnblogs.com/moonandstar08/p/8476228.html