Applying binary logs without adding to the binary log
Posted by Sheeri Cabral on Feb 25, 2010 Applying binary logs to a MySQL instance is not particularly difficult, using themysqlbinlog
command line utility:
1
2
| $> mysqlbinlog mysql-bin.000003 > 03.sql $> mysql < 03.sql |
SUPER
privilege:
1
| mysql> SET SESSION sql_log_bin=0; |
The mysqlbinlog utility has the
--disable-log-bin
option. All the option does is add the SET SESSION sql_log_bin=0;
statement to the beginning of the output, but it is certainly much better than restarting the server twice!Here’s the manual page for the
--disable-log-bin
option of mysqlbinlog
: http://dev.mysql.com/doc/refman/5.1/en/mysqlbinlog.html#option_mysqlbinlog_disable-log-bin
No comments:
Post a Comment