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';

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.