清空日志

mysql> reset master;

查询是否开启了binlog

$mysql -uroot -p
mysql>use mysql;
mysql>
mysql> show variables like 'log_bin';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_bin       | ON    |
+---------------+-------+
1 row in set (0.01 sec)

关闭binlog

$sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
skip-log-bin # 添加

$sudo service mysql restart

再次查看

mysql> show variables like 'log_bin';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_bin       | OFF   |
+---------------+-------+
1 row in set (0.01 sec)

标签: mysql

添加新评论