A database error has occurred: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'date_expire' (SQL: ALTER TABLE announcements CHANGE date_expire date_expire DATE DEFAULT 'NULL')

Dear colleague,
i have a following problem if i want to upgrade OJS from 3.2.1.1 to 3.3.0.11:
i upgraded database too from MySQL 5.7 to Maria DB 10.3
system after upgrade button showed following message

A database error has occurred: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for ‘date_expire’ (SQL: ALTER TABLE announcements CHANGE date_expire date_expire DATE DEFAULT ‘NULL’)

i tried to change privileges for DB users where grant REFERENCE must be on, but our server provider does not enabled this function

but i succeeded this issue with following steps

  1. i opened database in provider and copy path to unix_socket
  2. i opened config.inc.php file on ftp server and open unix_socket and paste path, unix must be allowed

then upgrade passed successfull

problem solved

I prepared this message for another OJS users

2 Likes

I am mentioning the post to mark it as solution. Thanks @Lukas_Hleba

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.