January 2018
Intermediate to advanced
446 pages
12h 57m
English
While restoring binary logs, if you don’t want the mysqlbinlog process to create binary logs, you can use the --disable-log-bin option so that binary logs won't be written:
shell> sudo mysqlbinlog /data/mysql/binlogs/server1.000001 --start-position=660 --stop-position=1298 --disable-log-bin > binlog_restore
You can see that SQL_LOG_BIN=0 is written to the binlog restore file, which will prevent creating the binlogs.
/*!32316 SET @OLD_SQL_LOG_BIN=@@SQL_LOG_BIN, SQL_LOG_BIN=0*/;
Read now
Unlock full access