Announcement

#1 2020-06-23 09:47:50

homdax
Member
Sweden
2015-02-02
294

[mysql error 1062] Duplicate entry '0' for key 'PRIMARY'

I migrated a site and while doing that I had some issues dumping in the database. Had to take out the SQL for History table and import it in two split files since it was like 100MB large and my phpMyAdmin did only allow for 64MB imports.

When doing that I noticed rows changing Primary Key last in the sql , so I am guessing the Primary key alteration done that was somehow not applied correctly to some table since I an getting an error about that, from what I see the Activity for now.

Code:

Warning:  [mysql error 1062] Duplicate entry '0' for key 'PRIMARY'

INSERT  INTO `piwi_activity`
  (`object`,`object_id`,`action`,`performed_by`,`session_idx`,`ip_address`,`details`)
  VALUES('user','1','login','1','aecad1516ec31d01d441fbccb08a973d','31.15.36.206','a:2:{s:6:\"script\";s:5:\"index\";s:5:\"agent\";s:114:\"Mozilla/5.0 (X11; CrOS x86_64 13020.67.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36\";}') in /home/lotroshots/domains/shots.lotrokin.me/public_html/include/dblayer/functions_mysqli.inc.php on line 856

Needless to say I tried something like BigDump, but alas it does not seem to work very well anymore.

The site is working but I require some SQL assistance to remove these messages.

Piwigo version: Latest
PHP version: 7.3
MySQL version: 5.5.5-10.1.45-MariaDB
Piwigo URL: https://shots.lotrokin.me/

Offline

 

#2 2020-06-23 10:59:45

homdax
Member
Sweden
2015-02-02
294

Re: [mysql error 1062] Duplicate entry '0' for key 'PRIMARY'

Hmm, the error seems to have gone away after some database maintenance....

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact