Re: '0000-00-00' is an invalid date

From: bill <william_at_TechServSys.com>
Date: Mon, 5 Feb 2018 07:56:16 -0500
Message-ID: <p59k9f$sr$1_at_gioia.aioe.org>


On 2/4/2018 9:52 PM, Peter H. Coffin wrote:
> On Sun, 4 Feb 2018 15:27:40 -0500, bill wrote:
>

>> On 2/4/2018 10:52 AM, Peter H. Coffin wrote:
>>
>>> Two routes:
>>>
>>> a) Turn zero dates on in your SQL Mode then turn them back off again
>>> when you've fixed this. (If you want them off -- leaving them on will
>>> PROBABLY get you the behavior you were expecting in the beginning.
>>> But it's your database, so you're the one that has to live with any
>>> unexpected consequences of a permanent mode change now.)
>>
>> It appears that in the OS upgrade I went from 5.5.59 to 5.7.21 which
>> changed the mode so that NO_ZERO_DATE AND NO_ZERO_IN_DATE were set.
>>
>> As you suggested I want to set the mode to turn off NO_ZERO_DATE, but
>> can't see how. doing SET GLOBAL sql_mode ='' would probably cause lots
>> of changes I don't want. How does one set just one mode off?

>
> All that stuff, what the defaults are, how to turn the stuff on and off
> dynamically while the server is running, how to determine what modes
> are at in effect at the time are all at the top of the reference manual
> pages for 5.7. The suggestion I made to read through that whole section
> wasn't just me being snarky; it actually contains the information you
> needed to go down the path.
>
> https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html
>
I know your aren't. I did read the whole section, but I can't figure out how to turn _one_ mode off. I suppose I could turn off all modes and turn back on the others.

I would actually like to put the changes in to the my.conf (where the section says they can be put, but the format of the my.conf entry is not clear.

Any assistance would be appreciated.

-bill Received on Mon Feb 05 2018 - 13:56:16 CET

Original text of this message