Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Oct 2008 20:27:02 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Zbigniew Szalbot <zszalbot@gmail.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: mysql binlogs and their expiry times
Message-ID:  <48ED0986.6060100@infracaninophile.co.uk>
In-Reply-To: <94136a2c0810072248t7143c6am7b5740a7d770317d@mail.gmail.com>
References:  <94136a2c0810072248t7143c6am7b5740a7d770317d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48ED0986.6060100>