title: Mysql restores ONLY_FULL_GROUP_BY after restart
body: <p>I followed the 2nd answer of <a href="https://stackoverflow.com/questions/23921117/disable-only-full-group-by%20Disable%20ONLY_FULL_GROUP_BY">this SO question</a> to disable the global option 
  ONLY_FULL_GROUP_BY.</p>
  
  <pre><code>mysql&gt; SELECT @@sql_mode;
  +-------------------------------------------------------------------------------------------------------------------------------------------+
  | @@sql_mode                                                                                                                                |
  +-------------------------------------------------------------------------------------------------------------------------------------------+
  | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
  +-------------------------------------------------------------------------------------------------------------------------------------------+
  1 row in set (0,00 sec)
  
  
  mysql&gt; SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
  Query OK, 0 rows affected (0,00 sec)
  
  
  mysql&gt; SELECT @@sql_mode;
  +------------------------------------------------------------------------------------------------------------------------+
  | @@sql_mode                                                                                                             |
  +------------------------------------------------------------------------------------------------------------------------+
  | STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
  +------------------------------------------------------------------------------------------------------------------------+
  1 row in set (0,00 sec)
  </code></pre>
  
  <p>I just discovered that after a mysql service restart, this option is restored.</p>
  
  <p>This is my environment</p>
  
  <pre><code>Server: Localhost via UNIX socket
  MySQL 5.7.17-0ubuntu0.16.04.1 
  Ubuntu 16.04
  </code></pre>
  
  <p>I thinked it was in one of the config files, but I'm not able to find it. Can you point me <strong>where is it located</strong> or how to <strong>permanently disable</strong> it?</p>