Error Received the following error message: SQLSTATE[42000]: Syntax error or access violation: 1067

Versuche Shopware 5.6 zu installieren. Erstinstallation auf leerem Webspace.  Egal ob mit dem Installer oder per Zip & FTP, mitten im Anlegen der Tabellen geht er auf die Nase.
Hat jemand eine Idee was da wirklich der Fehler sein könnte?

THX vorab, Otmar

//================================================================

Error
Received the following error message:
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'password_change_date’

Please try to fix this error and restart the update.
Response

{„query“:„CREATE TABLE s_user (\n  id int(11) NOT NULL AUTO_INCREMENT,\n  password varchar(1024) COLLATE utf8_unicode_ci NOT NULL,\n  encoder varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT ‚md5‘,\n  email varchar(70) COLLATE utf8_unicode_ci NOT NULL,\n  active int(1) NOT NULL DEFAULT ‚0‘,\n  accountmode int(11) NOT NULL,\n  confirmationkey varchar(100) COLLATE utf8_unicode_ci NOT NULL,\n  paymentID int(11) NOT NULL DEFAULT ‚0‘,\n  doubleOptinRegister tinyint(1) DEFAULT ‚0‘,\n  doubleOptinEmailSentDate datetime DEFAULT NULL,\n  doubleOptinConfirmDate datetime DEFAULT NULL,\n  firstlogin date NOT NULL DEFAULT ‚0000-00-00‘,\n  lastlogin datetime NOT NULL DEFAULT ‚0000-00-00 00:00:00‘,\n  sessionID varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,\n  newsletter int(1) NOT NULL DEFAULT ‚0‘,\n  validation varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT ‚0‘,\n  affiliate int(10) NOT NULL DEFAULT ‚0‘,\n  customergroup varchar(15) COLLATE utf8_unicode_ci NOT NULL,\n  paymentpreset int(11) NOT NULL,\n  language varchar(10) COLLATE utf8_unicode_ci NOT NULL,\n  subshopID int(11) NOT NULL,\n  referer varchar(255) COLLATE utf8_unicode_ci NOT NULL,\n  pricegroupID int(11) unsigned DEFAULT NULL,\n  internalcomment mediumtext COLLATE utf8_unicode_ci NOT NULL,\n  failedlogins int(11) NOT NULL,\n  lockeduntil datetime DEFAULT NULL,\n  default_billing_address_id int(11) DEFAULT NULL,\n  default_shipping_address_id int(11) DEFAULT NULL,\n  title varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,\n  salutation varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,\n  firstname varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n  lastname varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n  birthday date DEFAULT NULL,\n  customernumber varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,\n  login_token varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL,\n  changed datetime DEFAULT NULL,\n  password_change_date datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  PRIMARY KEY (id),\n  KEY email (email),\n  KEY sessionID (sessionID),\n  KEY firstlogin (firstlogin),\n  KEY lastlogin (lastlogin),\n  KEY pricegroupID (pricegroupID),\n  KEY customergroup (customergroup),\n  KEY validation (validation),\n  KEY default_billing_address_id (default_billing_address_id),\n  KEY default_shipping_address_id (default_shipping_address_id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci“,„success“:false,„offset“:2300,„errorMsg“:„SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for ‚password_change_date‘“}

//================================================================

 

Hm, welche MySQL Version hast du denn im Einsatz?

Könnte sein, dass es an der MySQL-Version liegt. In alten MySQL-Versionen wird "password_change_date datetime NOT NULL DEFAULT CURRENT_TIMESTAMP" gar nicht unterstützt.

1 „Gefällt mir“

Hi!
Ich habe das selbe Problem. MySQL Version 5.5, InnoDB. Gibt es ein Workaround?

MfG Patrick

@R4M schrieb:

Hm, welche MySQL Version hast du denn im Einsatz?

Könnte sein, dass es an der MySQL-Version liegt. In alten MySQL-Versionen wird „password_change_date datetime NOT NULL DEFAULT CURRENT_TIMESTAMP“ gar nicht unterstützt.

Du brauchst mindestens MySQL 5.7 für Shopware 5.6

1 „Gefällt mir“

Recht herzlichen Dank! Hab ein Update beantragt :slight_smile:

MfG Patrick

@Moritz Naczenski schrieb:

Du brauchst mindestens MySQL 5.7 für Shopware 5.6

THX für den Hint! Habe auf unserem Server Version: 5.5.60-MariaDB vorgefunden. Sehr spannend :wink:

Vielen Dank @ all!

Otmar

 

Installer schrieb:

Systemvoraussetzungen

Glückwunsch!
Alle Voraussetzungen für eine erfolgreiche Installation sind erfüllt

Das ist dann nicht besonders hilfreich. 
Was mir die Installtion ermöglichte:
siehe: recovery/install/data/sql/install.sql:7525
   password_change_date datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
ändern zu
  password_change_date datetime NOT NULL DEFAULT ‚0000-00-00 00:00:00‘,
Damit kann man zumindest einmal installieren und auch einen Kunden anlegen.