1. 程式人生 > >mysql報錯Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage

mysql報錯Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage

.cn nbsp 導致 variable ria sed size log more

mysql報錯Multi-statement transaction required more than ‘max_binlog_cache_size‘ bytes of storage

在執行create table xx as select xx的時候

或者在執行

tpcc-mysql的tpcc_load 的時候

都會遇到這個錯誤

1534, HY000, Writing one row to the row-based binary log failed
Retrying ...

1197, HY000, Multi-statement transaction required more than ‘max_binlog_cache_size‘ bytes of storage; increase this mysqld variable and try again

Retrying ...

因為使用的是騰訊雲主機,1核1G內存,內存不足導致的binlog cache size不夠不能寫入binlog,導致語句無法執行

解決辦法:

修改my.cnf,增大binlog_cache_size和max_binlog_cache_size參數的值

binlog_cache_size = 20M
max_binlog_cache_size = 100M

mysql報錯Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage