title: How to get rid of STRICT SQL mode in MySQL
body: <p>This is a follow up to this question <a href="https://stackoverflow.com/questions/17598629/mysql-incorrect-datetime-format">MYSQL incorrect DATETIME format</a></p>
  
  <p>How to get rid of STRICT_TRANS_TABLES once and for all?</p>
  
  <p><code>mysql --help</code> reports the following configs:</p>
  
  <pre><code>Default options are read from the following files in the given order:
  /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
  
  $ ls  /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
  ls: /Users/pain/.my.cnf: No such file or directory
  ls: /etc/mysql/my.cnf: No such file or directory
  ls: /usr/local/etc/my.cnf: No such file or directory
  /etc/my.cnf
  
  $ cat /etc/my.cnf
  [mysqld]
  sql_mode=NO_ENGINE_SUBSTITUTION
  </code></pre>
  
  <p>But this doesn't help. I have some legacy code and each time I reboot the computer I have to launch mysql and change sql_mode.</p>
  
  <p><strong>Update</strong></p>
  
  <p>So I gave up on Homebrew-installed MySQL and downloaded it from from mysql.com. But that didn't help either. Following the answers here: <a href="https://stackoverflow.com/questions/16475118/how-to-fix-unknown-variable-sql-mode-ansi">How to fix `unknown variable &#39;sql-mode=ANSI&#39;`?</a> I have tried different variations of <code>/etc/my.cnf</code>: <code>[mysql]</code>, <code>[mysqld]</code>, <code>sql_mode</code>, <code>sql-mode</code> – nothing helped.</p>