snippetsqlModerate
How do I make binlog-format=ROW the start up default in the /etc/my.cnf file?
Viewed 0 times
formatthefilemakestartcnfdefaulthowrowbinlog
Problem
I can run the query SET GLOBAL binlog_format = 'ROW' and it works for that session.
How do I make this setting stick after stopping and restarting MySQL?
NOTE: I am on version 5.5.19 of MySQL (with Moodle) and I just upgraded from MyISAM to InnoDB and therefore need this new setting.
I have tried adding these two commands (separately) to my.cnf: binlog-format=ROW and binlog_format=ROW and neither work. I have stopped and restarted MySQL every time I changed the my.cnf.
The error I get without this being set is the nefarious error message:
Debug info: 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.
How do I make this setting stick after stopping and restarting MySQL?
NOTE: I am on version 5.5.19 of MySQL (with Moodle) and I just upgraded from MyISAM to InnoDB and therefore need this new setting.
I have tried adding these two commands (separately) to my.cnf: binlog-format=ROW and binlog_format=ROW and neither work. I have stopped and restarted MySQL every time I changed the my.cnf.
The error I get without this being set is the nefarious error message:
Debug info: 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.
Solution
I think your problem may stem from where you wrote the directive
Make sure you place the option under the
If you place it under any other header, the mysqld process will not see it.
Give it a Try !!!
Make sure you place the option under the
[mysqld] header in /etc/my.cnf[mysqld]
binlog_format = ROWIf you place it under any other header, the mysqld process will not see it.
Give it a Try !!!
Code Snippets
[mysqld]
binlog_format = ROWContext
StackExchange Database Administrators Q#65273, answer score: 17
Revisions (0)
No revisions yet.