title: Logging MySQL query on Ubuntu
body: <p>I need to log SQL to a file so i can check later which SQL run.  </p>
  
  <p>so i opened <code>opt/lampp/etc/my.cnf</code> and add these lines  </p>
  
  <pre><code>log_slow_queries  
  log_queries_not_using_indexes =1  
  long_query_time = 1  
  slow_query_log = 1  
  slow_query_log_file = "/opt/lampp/logs/query.log"
  </code></pre>
  
  <p>but it did not logged the queries it even did not created the query.log file, so i created an empty file with the name, but still it's not working.</p>
  
  <p><code>Edit</code></p>
  
  <pre><code>[mysqld]
  log_slow_queries
  log_queries_not_using_indexes =1
  long_query_time = 1
  slow_query_log = 1
  general_log = 1
  slow_query_log_file = /opt/lampp/logs/query.log
  general_log_file = "/opt/lampp/logs/query.log"
  </code></pre>