mysql> insert into test values (”,’lzh’); ERROR 1598 (HY000): Binary logging not possible. Message: Transaction level ‘READ-COMMITTED’ in InnoDB is not safe for binlog mode ‘STATEMENT’ 查看一下,是否是,代码如下:
mysql> show global variables like ‘binlog_format%'; +—————+——-+ | Variable_name | Value | --phpfensi.com +—————+——-+ | binlog_format | STATEMENT | +—————+——-+ 1 row in set (0.00 sec) 中文意思是,二进制日志不可用,因为,在innodb引擎下的READ-COMMITTED这种事务类别下,二进制的模式为STATEMENT,会不安全,查资料了解到.
mysql> insert into test values (”,’lzh’); ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect… Connection id: 1 Current database: test Query OK, 1 row affected, 1 warning (0.00 sec) 总结:一般,二种方法同时用,效果最佳.