 <p>If you want to keep record of all queries that are executed, you can enable either the <a href="http://dev.mysql.com/doc/refman/5.5/en/query-log.html" rel="nofollow">General Query Log</a> or the <a href="http://dev.mysql.com/doc/refman/5.5/en/slow-query-log.html" rel="nofollow">Slow Query Log</a> and set the threshold to 0 seconds (any query that takes more than 0 seconds will be logged). </p> <p>Another option is the <a href="http://dev.mysql.com/doc/refman/5.5/en/binary-log.html" rel="nofollow">Binary log</a>. However, binary log does not keep record of queries like <code>SELECT</code> or <code>SHOW</code> that do not modify data.</p> <p>Note that these logs get pretty big pretty fast in a server with traffic. And that both might contain passwords so they have to be protected from unauthorized eyes.</p>