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

前端 未结 13 1582
一整个雨季
一整个雨季 2020-12-13 12:52

UPDATE FIXED 1/18/15

After we recently updated to MySQL 5.6.27 (from the Ubuntu repo), this option now works. So this appears to have been a problem with the previ

13条回答
  •  爱一瞬间的悲伤
    2020-12-13 13:07

    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.

提交回复
热议问题