问题:
Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
思考过程:
结合百度发现是java事务工作模式要求的日志格式为row,而我开启binlog后没有指定工作模式,而mysql默认的log工作模式为statement模式,
可以进入mysql使用show variables like "binlog_format";查看。下图是指开启binlog未指定格式:
解决方法:
修改my.cnf配置文件在mysqld块添加: binlog_format = row 参数, 并重启mysql服务。
结果:
查看log格式为ROW,项目可正常访问,问题解决。