Skip to content

备份

开启

  • my.cnf
properties
[mysqld]
server-id              = 100
log_bin                = /var/log/mysql/mysql-bin
binlog-format          = ROW
expire_logs_days       = 7
max_binlog_size        = 500M
  • 查看是否开启
sql
show variables like 'log_bin';
  • 查看日志列表
sql
show binary logs;

查看日志

mysqlbinlog --help

shell
mysqlbinlog --no-defaults  --base64-output=decode-rows -v mysql-bin.000001