How to make sql-mode=”NO_ENGINE_SUBSTITUTION” permanent in MySQL my.cnf

Just to add my configuration to the mix, I’m using MySQL 5.7.8 which has the same strict sql_mode rules by default.

  • I finally figured the following working in my /etc/mysql/my.conf:

    [mysqld]
    sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
    

i.e. dash, not underscore and quotes around the value.

  • I have NO other my.conf files other than /etc/mysql/my.conf

  • There are some extra config includes being loaded from /etc/mysql/conf.d/ but they are blank.

And that seems to work for me.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)