[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recovering mysql data - mysqlbinlog



--On Thursday, May 01, 2008 21:52:05 +0200 Mel <fbsd_(_dot_)_questions_(_at_)_rachie_(_dot_)_is-a-geek_(_dot_)_net> wrote:

On Thursday 01 May 2008 21:13:41 John wrote:
Thank you Mel and Paul for the suggestions.  From what I understand the
general query log is more for debugging and the binary log is for point in
time recovery and replication.  I'll be adding a my.cnf file (using the
my-large.cnf as a skeleton) soon.  I'm glad the issue was caught earlier on
and now I'm the wiser thanks to you guys.  I wonder why the default is no.
I can't think of anyone who wouldn't find the binary logging beneficial.

I can think of a reason for FreeBSD. The binary logs are never deleted and
upon every server restart a new one is created. If you're like me, developing
on a laptop with a webenvironment including 'Mysql server', shutting down
your laptop daily, you quickly find yourself having full /var partition.


That can be alleviated by adding the logs to newsyslog.conf and gzipping and rotating them regularly.
If you don't restart mysql much, something like this would work:

/var/db/mysql/[hostname]-bin.* mysql:mysql 660 7 * $W6D0 JBG /var/db/mysql/[FQHN].pid

If you're restarting it daily, something like this should work:

/var/db/mysql/[hostname]-bin.* mysql:mysql 660 25 * $D0 JBG /var/db/mysql/[FQHN].pid

Adjust the counts and the rotation schedule to your liking and, of course, use your own hostname and fully qualified hostname.

--
Paul Schmehl (pauls_(_at_)_utdallas_(_dot_)_edu)
Senior Information Security Analyst
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/

_______________________________________________
freebsd-questions_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe_(_at_)_freebsd_(_dot_)_org"


Visit your host, monkey.org