[debian-mysql] Binary Logging

Christian Hammers ch at lathspell.de
Mon Nov 19 22:55:02 UTC 2007



On 2007-11-09 Christian Hammers wrote:
> On Fri, 09 Nov 2007 14:07:30 +0100
> Norbert Tretkowski <norbert at tretkowski.de> wrote:
> 
> > Hi,
> > 
> > why are binlogs enabled by default? I think the typical user of the
> > Debian MySQL packages doesn't need it, and who really needs it knows
> > how to enable it.
> 
> I don't know a reason for it to stay so I guess you can comment it out in
> the mysql-dfsg-5.1/debian/additions/my.cnf.

http://dev.mysql.com/doc/refman/5.1/en/binary-log.html
...
For this option to provide a greater degree of safety, the MySQL server should also be configured to synchronize the binary log and the InnoDB logs to disk at every transaction. The InnoDB logs are synchronized by default, and sync_binlog=1 can be used to synchronize the binary log. The effect of this option is that at restart after a crash, after doing a rollback of transactions, the MySQL server cuts rolled back InnoDB  transactions from the binary log. This ensures that the binary log reflects the exact data of InnoDB tables, and so, that the slave remains in synchrony with the master (not receiving a statement which has been rolled back


So the binlog seems to be useful for crash restauration as well and
therefore should stay enabled by default. The above page also says
that the drawback is just 1% performance. I noticed the following
as my server just crashed:

Nov 19 23:19:41 gate mysqld[5250]: InnoDB: Doing recovery: scanned up to log sequence number 0 12554088
Nov 19 23:19:41 gate mysqld[5250]: InnoDB: Last MySQL binlog file position 0 95697, file name /var/log/mysql/mysql-bin.000027


bye,

-christian-



More information about the pkg-mysql-maint mailing list