How to fix SQL error to Install Prestashop

When you install Prestashop on a server with Mysql 5.7, you will get an error occured installation process :

"SQL error on query All parts of a PRIMARY KEY must be NOT NULL, if you need NULL in a key, use UNIQUE instead​"

This error will breaks your installation process whether you try to reinstall as many times. Here is the way to fix this problem.

Open your Prestashop-package/install/data/db_structure.sql file :

Prestashop Installation Error

Find

CREATE TABLE `PREFIX_cart_product`
Look below this line and change PRIMARY KEY to UNIQUE

prestashop-install-error.png

Save and exit. That's all. Now you can re-install without any problems.

Get this Advanced Cart Rules module

New module.

Xleft module

Xleft shows customers how much more they need to spend to get free shipping in real time.

Ultimo aggiornamento moduli!

Age Restriction - 18+ ⊙
Risolvere alcuni problemi di visualizzazione sui dispositivi mobili.


Newsletter Popup v3.2.2
Christmas Edition per incrementare le tue vendite.


Trusty v1.4.7 ⊙ 
Compatibile con PrestaShop 1.7 e PrestaShop 8.

PrestaSOO team
Tutto il necessario per guadagnarti da vivere facendo il lavoro che ami.

Scoprire


È un investimento saggio

I moduli Prestashop che abbiamo creato per primi per risolvere il problema del nostro business - un sito di e-commerce. Ciò significa che sono molto utili per un'azienda seria. Se apprezzi la tua proprietà web, questi moduli sono un investimento saggio.
Sarah Reeves, Sviluppatore di app @ PrestaSOO
Realizzato con a Parigi e Hanoi
PrestaSOO © 2024. Tutti i diritti riservati. // Politica sulla riservatezza Termini di servizio