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

Re: bin files in var/log/mysql



Brent Clark wrote:
Hi all

I saw all a few bin files in var/log/mysql.

trinity:/var/log/mysql# ls -la
total 5760
drwxr-s---  2 mysql adm    4096 2006-05-18 07:47 .
drwxr-xr-x 13 root  root   4096 2006-05-18 08:13 ..
-rw-rw----  1 mysql adm  145221 2006-05-13 07:35 mysql-bin.000133
-rw-rw----  1 mysql adm  178978 2006-05-14 07:35 mysql-bin.000134
-rw-rw----  1 mysql adm   99868 2006-05-15 07:58 mysql-bin.000135
-rw-rw----  1 mysql adm   97529 2006-05-16 07:52 mysql-bin.000136
-rw-rw----  1 mysql adm   73481 2006-05-17 07:52 mysql-bin.000137
-rw-rw----  1 mysql adm  422265 2006-05-18 07:47 mysql-bin.000138
-rw-rw----  1 mysql adm  248005 2006-05-18 14:07 mysql-bin.000139
-rw-rw----  1 mysql adm     800 2006-05-18 07:47 mysql-bin.index

Those are MySQLs binary logfiles as specified by the "log-bin" parameter in /etc/mysql/my.cnf. You can examine them with the mysqlbinlog tool, just type for example

  $ mysqlbinlog mysql-bin.000139

Could anyone please tell me what are these for,

Simply to log update queries (see my.cnf and the MySQL administration manual).

> and I would like to know
how come they dont get compress / rotated.

Check /etc/logrotate.d/mysql-server.

> It seem like files will just
keep on getting created with out
 old files been deleted.

Check the "rotate" parameter in the above file.

	-- Kilian



Reply to: