2

I am trying to disable NO_ZERO_IN_DATE and NO_ZERO_DATE in the sql_mode but whenever I am restarting the server it just pops back up...

I have used those commands:

SET sql_mode=(SELECT REPLACE(@@sql_mode,'NO_ZERO_DATE',''));

set sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER';
Omer
  • 57
  • 1
  • 7

1 Answers1

7

Please see the following answer here

As it mentions that if you set sql_mod with following commands the setting will revert after a reboot.

You should locate your mysql conf file which is usually in /etc/mysql/my.cnf (Please consider it might be different since you haven't give any information about your server.) and edit the following (or similar) lines in your configuration file

[mysqld] 
sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
eyups
  • 711
  • 7
  • 12