SQL Modes for 2.6.4 - NO_ZERO_IN_DATE

62 views
Skip to first unread message

Kevin Bowrin

unread,
Aug 23, 2021, 4:37:57 PM8/23/21
to AtoM Users

Hello all,

By default, our installation of MySQL 8.0 in CentOS 7.9 adds NO_ZERO_IN_DATE as one of the SQL modes. NO_ZERO_IN_DATE is incompatible with AtoM 2.6.4, correct?

We have a MySQL configuration file which sets

sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

Now I need to figure out how to remove a SQL mode, not add one...

(By the way, for anyone searching in the future, we found this error when this came up in the logs: "PHP message: Unable to execute INSERT statement. [wrapped: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect date value: '1945-0-0' for column 'start_date' at row 1]")

Thanks!

Dan Gillean

unread,
Aug 24, 2021, 8:55:23 AM8/24/21
to ICA-AtoM Users
Hi Kevin, 

Yes, that's correct. When a user enters only a year-based date into AtoM's edit template for a description or an accession, AtoM will save the date as YYYY-00-00, so I don't suggest using the NO_ZERO_IN_DATE sqlmode. 

As for changing SQL modes, see: 
You may need access to the MySQL command prompt to do so (there are two ways to do it). If so, that means knowing your installation database username and password. We have some suggestions on how to check this and access the MySQL command prompt here: 

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/1f3a952a-0703-4c1c-89e0-5abf8b9a089cn%40googlegroups.com.

Kevin Bowrin

unread,
Aug 24, 2021, 8:59:27 AM8/24/21
to ica-ato...@googlegroups.com
Thanks for confirming Dan!

You received this message because you are subscribed to a topic in the Google Groups "AtoM Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ica-atom-users/f126yRpTrS8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/CAC1FhZLM05MDeeF-Bb%2BqG3PKTX8HhaAyB2UECvx1bXsTT9nycg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages