title: Unable to enable logs in MySQL - error : Found option without preceding group in config file
body: <p>I am trying to enable logs on my MySQL server but with no success.
  What I have done :    </p>
  
  <p>1) I have created the log file with the right permissions :   </p>
  
  <pre><code>touch /var/log/mysql/mysql.log   
  chown mysql:mysql /var/log/mysql/mysql.log
  </code></pre>
  
  <p>2) I have added the needed change to the <code>my.cnf</code> file :</p>
  
  <pre><code>general_log_file        = /var/log/mysql/mysql.log
  general_log             = 1
  </code></pre>
  
  <p>My <code>my.cnf</code> file is the following :</p>
  
  <pre><code>#
  # The MySQL database server configuration file.
  #
  # You can copy this to one of:
  # - "/etc/mysql/my.cnf" to set global options,
  # - "~/.my.cnf" to set user-specific options.
  #
  # One can use all long options that the program supports.
  # Run program with --help to get a list of available options and with
  # --print-defaults to see which it would actually understand and use.
  #
  # For explanations see
  # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
  
  #
  # * IMPORTANT: Additional settings that can override those from this file!
  #   The files must end with '.cnf', otherwise they'll be ignored.
  #
  
  !includedir /etc/mysql/conf.d/
  !includedir /etc/mysql/mysql.conf.d/
  
  general_log_file        = /var/log/mysql/mysql.log
  general_log             = 1
  </code></pre>
  
  <p>I am unable to restart MySQL and when I try to logging, I have this error :</p>
  
  <blockquote>
    <p>error: Found option without preceding group in config file:
    /etc/mysql/my.cnf at line: 23 Fatal error in defaults handling.
    Program aborted</p>
  </blockquote>
  
  <p>What does that mean and how I can fix this ?</p>
  
  <p>I am using <strong>Ubuntu 15.05</strong> with <strong>MySQL 5.6.24-0ubuntu2</strong></p>