LoginSignup
6
7

More than 5 years have passed since last update.

MySQL レプリケーションエラーの対処

Last updated at Posted at 2014-12-18

BINLOG_FORMATで怒られる場合

sql
mysql> show slave status \G

sql
Last_Error: Error executing row event: 'Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.'

とでたら、

sql
mysql> SHOW GLOBAL VARIABLES LIKE 'binlog_format';

でbinlog_formatを確認。

マスターとスレーブで異なっているいる場合に起こるようです。

コマンドでmysqlを再起動せずに変更するなら、※扱い注意!

sql
mysql> slave stop;
mysql> SET GLOBAL binlog_format = 'MIXED';
mysql> slave start;
mysql> show slave status ¥G;

※忘れずにmy.cnfにも記述してmysql再起動後も反映されるように。

my.cnf
binlog_format = MIXED
6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7