From owner-freebsd-questions@FreeBSD.ORG Thu Oct 9 05:06:44 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 DBB341065696 for ; Thu, 9 Oct 2008 05:06:44 +0000 (UTC) (envelope-from zszalbot@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.231]) by mx1.freebsd.org (Postfix) with ESMTP id 968E28FC23 for ; Thu, 9 Oct 2008 05:06:44 +0000 (UTC) (envelope-from zszalbot@gmail.com) Received: by wr-out-0506.google.com with SMTP id c8so823582wra.27 for ; Wed, 08 Oct 2008 22:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=yRhuFuoPbcx3Gw/v5islMNzRTOh5OnA99bkE6ZxC5y8=; b=kRFwQEN7aK4A0k0M7GNpfYL2g5LJMv0m4De5ga9RyPPPREQPqP2cHALBT6rtx6r/er z5y+WWtLxUhb+kMT7dDmUsYRCpRPopwyq4bCvzeYKZiUtmeGmrqMAhSb05KDB4Vvtci6 X7GaWd6c6gWYvaPcICZcfJeYqgGp+BJY1sBE8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Jm2itzxSOtNVToBH8Ec4jRAQKPaSH9+jnkAYbnk2Mwexe2KllFIR7NCLUOOa+9Q/wT Y+6CkyEERC7waj7DQRBHgLO8KwPpLg1aOccIWv29dgBEdTlIV0vZ1Q0CLbab6AI6sOUW XQ+mdujFBYDnS4RNh3Xa3xqymS8hb6T+v1Ic0= Received: by 10.64.184.16 with SMTP id h16mr15363021qbf.47.1223528802647; Wed, 08 Oct 2008 22:06:42 -0700 (PDT) Received: by 10.64.112.18 with HTTP; Wed, 8 Oct 2008 22:06:42 -0700 (PDT) Message-ID: <94136a2c0810082206u3e1de52el320672c67665ef5a@mail.gmail.com> Date: Thu, 9 Oct 2008 07:06:42 +0200 From: "Zbigniew Szalbot" To: freebsd-questions In-Reply-To: <48ED0986.6060100@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <94136a2c0810072248t7143c6am7b5740a7d770317d@mail.gmail.com> <48ED0986.6060100@infracaninophile.co.uk> 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: Thu, 09 Oct 2008 05:06:45 -0000 Hello, >> -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 > What's the output from running this SQL: "SHOW BINARY LOGS ;" ? mysql> SHOW BINARY LOGS ; +------------------+------------+ | Log_name | File_size | +------------------+------------+ | mysql-bin.000055 | 986782722 | | mysql-bin.000056 | 1073742442 | | mysql-bin.000057 | 754496837 | +------------------+------------+ 3 rows in set (0.01 sec) $ cat /usr/local/mysql/mysql-bin.index ./mysql-bin.000055 ./mysql-bin.000056 ./mysql-bin.000057 So all seems fine. Actually, I have taken this question to mysql list and found out that other users are reporting similar problems. http://lists.mysql.com/mysql/206576 http://bugs.mysql.com/bug.php?id=28238 http://lists.mysql.com/mysql/202793 So my final solution (if anyone's interested) was adding this to crontab 11 11 * * * /usr/local/bin/mysql -u root -psecret -e "PURGE MASTER LOGS BEFORE DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY)" It works so no problem but I do not really like the idea of providing passwords in crontab. I wish the option in my.cnf file worked as advertised. Anyway, thank you very much for your help. -- Zbigniew Szalbot