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
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 856The 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
try using this tool
https://www.ozerov.de/bigdump/
Offline
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
The tool worked great for me. It doesn't need updates.
Good luck.
Offline
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
You can prune history with [extension by Eric] Prune History.
Offline