# MySQL ignores my.cnf settings



## Ira (Jan 30, 2016)

Hi.
I installed mysql57 to a FreeBSD VMware machine on Windows.
In var/db/mysql iI created a my.cnf:

```
[mysqld]

sql_mode=NO_ENGINE_SUBSTITUTION
```

But mysql ignore sql_mode settings.

How iI can disable  `STRICT_TABLES, NO_ZERO_IN_DATE`?


----------



## julp (Jan 30, 2016)

An other approach might be to define `mysql_args="--sql-mode=STRICT_ALL_TABLES,NO_ZERO_IN_DATE"` to /etc/rc.conf.

I don't know if it is relevant but in one of my my.ini (on an other OS), I see I have used `sql-mode=...`, not `sql_mode=...`.


----------



## SirDice (Feb 1, 2016)

It's sql-mode not sql_mode.


> To set the SQL mode at server startup, use the --sql-mode="modes" option on the command line, or sql-mode="modes" in an option file such as my.cnf (Unix operating systems) or my.ini (Windows).


http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html


----------



## Ira (Feb 14, 2016)

yeah.  my wrong.
It works with `sql-mode`


----------

