Mertech Blog

Error when Binary Logging is Enabled in MySQL

Written by Mertech | Nov 26, 2013 11:49:00 PM

Several error messages may display during migration to a MySQL server when binary logging is enabled.


The first message displays during index creation.


A second message displays during data copy.


Cause

MySQL 5.0.16 introduced requirements that when binary logging is enabled, you must have the SUPER privilege and a function must be declared DETERMINISTIC if you are using statement-based (the default) binary-logging.


Solution

Binary logging is enabled in MySQL by adding these lines to the my.ini file:

#*** Binlog Settings
# Binary Log Options and Variables (Replication)
log-bin=mysql-bin
#Binary Log Options and Variables
sync_binlog=1

 


To resolve this problem, add these two lines to the [mysqld] section of the my.ini file:

log_bin_trust_routine_creators=1
binlog_format=row

 

This changes how MySQL enforces restrictions on stored function and trigger creation and changes the log format to use row-based logging.