网上所有的方法都试过了。均不可行。
这是我的做法
首先,查看binlog是否开启
+---------------------------------+-------+
| Variable_name | Value |
+---------------------------------+-------+
| log_bin | OFF |
| log_bin_trust_function_creators | OFF |
| sql_log_bin | ON |
+---------------------------------+-------+
然后,我打开log_gin
SET @@global.log_bin=1
mysql给我报错
ERROR 1238 (HY000): Variable 'log_bin' is a read only variable
将my.cnf中binlog前面的#删除掉。仍然无效果。我的意思是 重启了也不行啊。
Post your my.cnf related configuration, there may be something wrong.
SET SQL_LOG_BIN=1
my.cnf
log_bin=mysql-bin
# Setting this parameter means enabling the binlog function and specifying the path nameflush logs;show master logs;#View logs