From owner-freebsd-questions@FreeBSD.ORG Wed Oct 8 19:27:17 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C84011065693 for ; Wed, 8 Oct 2008 19:27:17 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 47FDB8FC2F for ; Wed, 8 Oct 2008 19:27:17 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id m98JR9mM039848; Wed, 8 Oct 2008 20:27:11 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.2 smtp.infracaninophile.co.uk m98JR9mM039848 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1223494031; bh=zr6Zk86yBmDACZ mdmotPd+aC9q0Cv+T7mvlTwo1JIHA=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<48ED0986.6060100@infracaninophile.co.uk>|Date:=20Wed,=2 008=20Oct=202008=2020:27:02=20+0100|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.17=20(X11/20080929)|MIME-Version:=201 .0|To:=20Zbigniew=20Szalbot=20|CC:=20freebsd-qu estions=20|Subject:=20Re:=20mysql=20 binlogs=20and=20their=20expiry=20times|References:=20<94136a2c08100 72248t7143c6am7b5740a7d770317d@mail.gmail.com>|In-Reply-To:=20<9413 6a2c0810072248t7143c6am7b5740a7d770317d@mail.gmail.com>|X-Enigmail- Version:=200.95.6|Content-Type:=20multipart/signed=3B=20micalg=3Dpg p-sha256=3B=0D=0A=20protocol=3D"application/pgp-signature"=3B=0D=0A =20boundary=3D"------------enig3D648B285B5C3CF334AD6FD7"; b=gWW5xOj XCjw8notaaoNFHjhKYzR3DSicFQOBLcWT2zb4C9rT0NFmUNyjwLiVdqMBf1t9/u2YZ+ BGRpxlI7dxAR8DIcIYippyTupNVBg/OPyIM3b76A/yB5Y/GaAyOt9k8DBzFsprzJmP8 iDiD2UXE+EYN5/R8eityOot42cIhFs= Message-ID: <48ED0986.6060100@infracaninophile.co.uk> Date: Wed, 08 Oct 2008 20:27:02 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: Zbigniew Szalbot References: <94136a2c0810072248t7143c6am7b5740a7d770317d@mail.gmail.com> In-Reply-To: <94136a2c0810072248t7143c6am7b5740a7d770317d@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig3D648B285B5C3CF334AD6FD7" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (smtp.infracaninophile.co.uk [IPv6:::1]); Wed, 08 Oct 2008 20:27:11 +0100 (BST) X-Virus-Scanned: ClamAV 0.94/8395/Wed Oct 8 17:44:51 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions Subject: Re: mysql binlogs and their expiry times X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 19:27:18 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3D648B285B5C3CF334AD6FD7 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Zbigniew Szalbot wrote: > Hi there, >=20 > I hope someone can help. Due to they way my HD has been sliced I had > to move mysql database to /usr/local/mysql. All works fine. Last week > I added this entry >=20 > #expire bin logs > expire_logs_days =3D 7 >=20 > to /usr/local/mysql/my.cnf >=20 > I restarted the MySQL server and now I have been waiting for the > binlogs to automatically expire but this is not happening: >=20 > $ ls -l /usr/local/mysql >=20 > -r--r--r-- 1 mysql mysql 4954 Oct 1 07:30 my.cnf > drwx------ 2 mysql mysql 1536 Sep 27 07:10 mysql > -rw-rw---- 1 mysql mysql 1073745213 Sep 2 04:07 mysql-bin.000047 > -rw-rw---- 1 mysql mysql 1073746878 Sep 7 03:48 mysql-bin.000048 > -rw-rw---- 1 mysql mysql 1073745707 Sep 11 20:07 mysql-bin.000049 > -rw-rw---- 1 mysql mysql 175527890 Sep 12 08:32 mysql-bin.000050 > -rw-rw---- 1 mysql mysql 128272 Sep 12 08:40 mysql-bin.000051 > -rw-rw---- 1 mysql mysql 1073745119 Sep 17 04:35 mysql-bin.000052 > -rw-rw---- 1 mysql mysql 1073747657 Sep 22 04:26 mysql-bin.000053 > -rw-rw---- 1 mysql mysql 1073744456 Sep 27 03:28 mysql-bin.000054 > -rw-rw---- 1 mysql mysql 986782722 Oct 1 07:32 mysql-bin.000055 > -rw-rw---- 1 mysql mysql 1073742442 Oct 6 04:18 mysql-bin.000056 > -rw-rw---- 1 mysql mysql 536487381 Oct 8 07:45 mysql-bin.000057 > -rw-r----- 1 mysql mysql 209 Oct 6 04:18 mysql-bin.index >=20 > Do you have any idea why? Or if /usr/local/mysql/ is a correct > location for my.cnf file? Perhaphs it should go to /usr/local/etc/ ? >=20 > If it matters, I use > $ pkg_info -Ix mysql-s > mysql-server-5.0.67 Multithreaded SQL database (server) > from ports. >=20 What's the output from running this SQL: "SHOW BINARY LOGS ;" ? MySQL can get confused if you physically move the data directory -- especially if you set the logging directory explicitly in my.cnf=20 rather than just accepting the default location. Look at the mysql-bin.index file -- it's pure ascii text -- and it should list all the known binlog file names. If what you have doesn't= correspond with reality, then stop the mysql process, edit that index file back into sanity and restart mysql. Easy. Cheers, Matthew =09 --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig3D648B285B5C3CF334AD6FD7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkjtCY0ACgkQ8Mjk52CukIzzhwCfeQeXf4vR03Yn1hiXvwXoGJve wBAAn2MrI7ggcs9kk1RsAb9ygGQs3NNK =BND6 -----END PGP SIGNATURE----- --------------enig3D648B285B5C3CF334AD6FD7--