<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Be careful rotating MySQL logs</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:23:57 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: 日志文件的快速删除 &#124; 快乐生活，快乐工作</title>
		<link>http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/comment-page-1/#comment-219279</link>
		<dc:creator>日志文件的快速删除 &#124; 快乐生活，快乐工作</dc:creator>
		<pubDate>Mon, 17 Dec 2007 04:25:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/#comment-219279</guid>
		<description>[...] from：http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/ [...]</description>
		<content:encoded><![CDATA[<p>[...] from：http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/ [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/comment-page-1/#comment-215472</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 10 Dec 2007 13:12:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/#comment-215472</guid>
		<description>Sheeri,

Good point. However  you do not always have to use the logs to keep them enabled.  Sometimes you have them in case you will need to use them - ie you want to check what happened during some point in time in the past. 

It is also worth to note in MySQL 5.0 you can&#039;t enable/disable general query log without restarts so if you may need it sometimes and you can&#039;t afford server restarts you just need to have it enabled.

Nice workaround I&#039;ve seen though is  having symlink from general.log -&gt; /dev/null  which allow you to disable writes when you do not need log file without server restarts. Though of course some of logging overhead remains in this case.</description>
		<content:encoded><![CDATA[<p>Sheeri,</p>
<p>Good point. However  you do not always have to use the logs to keep them enabled.  Sometimes you have them in case you will need to use them &#8211; ie you want to check what happened during some point in time in the past. </p>
<p>It is also worth to note in MySQL 5.0 you can&#8217;t enable/disable general query log without restarts so if you may need it sometimes and you can&#8217;t afford server restarts you just need to have it enabled.</p>
<p>Nice workaround I&#8217;ve seen though is  having symlink from general.log -> /dev/null  which allow you to disable writes when you do not need log file without server restarts. Though of course some of logging overhead remains in this case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/comment-page-1/#comment-215470</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 10 Dec 2007 13:09:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/#comment-215470</guid>
		<description>Martin,

For large log files &quot;echo &gt; logfile.log&quot; seems to stall writes to the log file until echo command is completed. This at least applies to some filesystems on Linux so I&#039;d be careful.

This is however good way for small log files :)</description>
		<content:encoded><![CDATA[<p>Martin,</p>
<p>For large log files &#8220;echo > logfile.log&#8221; seems to stall writes to the log file until echo command is completed. This at least applies to some filesystems on Linux so I&#8217;d be careful.</p>
<p>This is however good way for small log files <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sheeri Cabral</title>
		<link>http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/comment-page-1/#comment-215330</link>
		<dc:creator>Sheeri Cabral</dc:creator>
		<pubDate>Mon, 10 Dec 2007 07:30:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/#comment-215330</guid>
		<description>The other point to be made is to make sure you use the logs.  Why are you logging, if not to use the logs?  If you need or want them for historical purposes, or possible forensics, then they should be archived to another server.  Certainly log rotation should be considered when logs are enabled -- and not just for MySQL, but for any log.</description>
		<content:encoded><![CDATA[<p>The other point to be made is to make sure you use the logs.  Why are you logging, if not to use the logs?  If you need or want them for historical purposes, or possible forensics, then they should be archived to another server.  Certainly log rotation should be considered when logs are enabled &#8212; and not just for MySQL, but for any log.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Roest</title>
		<link>http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/comment-page-1/#comment-215119</link>
		<dc:creator>Martin Roest</dc:creator>
		<pubDate>Sun, 09 Dec 2007 20:50:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/12/09/be-careful-rotating-mysql-logs/#comment-215119</guid>
		<description>I assume purging the logfile like &#039;&gt; logfile.log&#039; is ok.</description>
		<content:encoded><![CDATA[<p>I assume purging the logfile like &#8216;&gt; logfile.log&#8217; is ok.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
