1.修改配置文件 vi /etc/my.cnf log-bin = binlog systemctl restart mysqld mysql -uroot -p123456 mysql> show variables like 'log_bin' ; mysql> show VARIABLES like '%log_bin%'; ls /var/lib/mysql/ 2.创建数据库 create database mytest; use mytest; create table t(a in…
一.查看下自己的MySQL是否开启了binlog日志 # 是否启用binlog日志 OFF:关闭 ON:开启 show variables like 'log_bin'; 二.开启binlog日志 在linxu服务器中找到my.cnf : mysql --help | grep 'Default options' -A 1 执行结果 Default options are read from the following files in the given order: /etc/my.cnf…