#1 2020-08-19 13:46:48

homdax
Member
Sweden
2015-02-02
323

Database error after moving site - History / Activity

hiya,
after migrating a site to a new host I got some db issues, also preventing image upload.

I get the following upon accessing the site

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','4bd94fddca43db452580809410b74fa0','109.228.138.41','a:2:{s:6:\"script\";s:5:\"index\";s:5:\"agent\";s:115:\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36\";}') in /home/lotroshots/domains/shots.lotrokin.me/public_html/include/dblayer/functions_mysqli.inc.php on line 856

The cause might be the following:
In migrating the site I hade to import the history table by itself since it was to large for a phpmyadmin import - over 100 mb, so I divided it into 2-3 blocks and imported them via sql insert, but something obviously came out wrong so it would be great if you could help me correct this. How that may have affected the activity table i don't know, but that is what I did.

The site is shots.lotrokin.me, linked below...

Last edited by homdax (2020-08-19 13:47:29)

Offline

 

#2 2020-08-19 19:08:16

executive
Member
2017-08-16
1236

Re: Database error after moving site - History / Activity

try using this tool

https://www.ozerov.de/bigdump/

Offline

 

#3 2020-08-19 22:19:09

homdax
Member
Sweden
2015-02-02
323

Re: Database error after moving site - History / Activity

That tool is in currently in a mess - not updated for long, since 2015 if you look at the file, and I already have the database in place with only that error. I have no wish to repeat all the steps I did once more.

Offline

 

#4 2020-08-20 07:26:20

executive
Member
2017-08-16
1236

Re: Database error after moving site - History / Activity

The tool worked great for me. It doesn't need updates.

Good luck.

Offline

 

#5 2025-03-18 14:42:08

beepro
Member
2021-09-05
61

Re: Database error after moving site - History / Activity

I also noticed the huge "history" table. like 60 meg (about 50% of the whole database). is it needed? I am guessing I cannot delete it during a migration?

Offline

 

#6 2025-03-19 12:38:33

erAck
Only trying to help
2015-09-06
2236

Re: Database error after moving site - History / Activity

You can prune history with [extension by Eric] Prune History.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB