<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Windows System Administrator Help &#187; mysql query log</title>
	<atom:link href="http://linuxwindowsmaster.com/tag/mysql-query-log/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxwindowsmaster.com</link>
	<description></description>
	<lastBuildDate>Wed, 15 Feb 2012 17:58:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Enable MySQL Query Log File</title>
		<link>http://linuxwindowsmaster.com/enable-mysql-query-log-file/</link>
		<comments>http://linuxwindowsmaster.com/enable-mysql-query-log-file/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 18:35:57 +0000</pubDate>
		<dc:creator>Alex P</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[log-slow-queries]]></category>
		<category><![CDATA[long_query_time]]></category>
		<category><![CDATA[mysql enable query log]]></category>
		<category><![CDATA[mysql query log]]></category>
		<category><![CDATA[mysqld]]></category>
		<category><![CDATA[SQL queries]]></category>

		<guid isPermaLink="false">http://linuxwindowsmaster.com/?p=95</guid>
		<description><![CDATA[MySQL has built-in functionality that allows you to log SQL queries to a file , You can enable the full SQL queries logs to a file or only slow running queries log.  It is easy for us to troubleshoot/ debug the sql statement if SQL queries log enable , The slow query log  is  used [...]]]></description>
			<content:encoded><![CDATA[<p><strong>MySQL</strong> has built-in functionality that allows you to log <strong>SQL queries</strong> to a file , You can enable the full SQL queries logs to a file or only slow running queries log.  It is easy for us to troubleshoot/ debug the <strong>sql statement</strong> if SQL queries log enable , The slow query log  is  used to find queries that take a long time to execute and are therefore candidates for optimization.</p>
<p>To enable you just need to add some lines to your<strong> my.cnf file</strong>, and restart. Add the following:</p>
<ul>
<li><strong>To enable slow Query Log only</strong></li>
</ul>
<p><strong>log-slow-queries = /var/log/mysql/mysql-slow.log<br />
long_query_time = 1</strong></p>
<p>After enabling slow query, <strong>mysqld </strong>writes a statement to the slow query log file and it consists of all <strong>SQL</strong> statements that took more than long_query_time seconds to execute. The time to acquire the initial table locks is not counted as execution time. mysqld only log after SQL statements has been executed and after all locks have been released, so log order might be different from execution order. The minimum and default values of long_query_time are 1 and 10, respectively.</p>
<ul>
<li><strong>To enable full Log Query</strong></li>
</ul>
<p><strong>log=/var/log/mysqldquery.log</strong></p>
<p>The above will log all queries to the log file.</p>
<p>Note :: Don&#8217;t forgot to restart mysql service after making changes in my.cnf file.</p>
<p>Regards</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxwindowsmaster.com/enable-mysql-query-log-file/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

