SMF Support > Install and Upgrade Help

Can't import .SQL file using phpmyadmin

(1/1)

Relemar:
Hi,

I'm resurrecting an old forum, i've got a mysql backup. its a .sql file with the whoel database in it, when I import into phpmyadmin i get this error:


--- Code: ---Error
SQL query:

-- -- Dumping data in `smf_log_search_subjects` -- INSERT INTO `smf_log_search_subjects` (`word`, `id_topic`) VALUES (0, 439), (0, 666), (0, 722), (000, 603), (02, 22), (02, 38), (02, 65), (03, 22), (04, 38), (04, 173), (080320, 138), ('0xc0000225', 664), (1, 17), (1, 26), (1, 38), (1, 290), (1, 520), (1, 521), (1, 657), (1, 739), (10, 38), (10, 173), (10, 304), (10, 696), (100, 214), (100, 231), (100, 250), (100, 260), (100, 262), (100, 285), (100, 311), (100, 314), (100, 352), (100, 369), (100, 567), (1000, 202), (11, 22), (11, 65), (1155, 249), (14, 127), (15, 138), ('18th', 512), ('1st', 179), (2, 119), (2, 268), (2, 290), (2, 306), (2, 333), (2, 439), (2, 481), (2, 499), (2, 508), (2, 543), (2, 555), (2, 722), (200, 451), (2008, 610), (2011, 301), (2011, 489), (2011, 532), (2011, 545), (2011, 579), (23, 65), (24, 583), ('24th', 511), (250, 3[...]

MySQL said:

#1062 - Duplicate entry '4-38' for key 'PRIMARY'
--- End code ---

I cannot fix this, i haven't a clue. the database isn't corrupt. thank you.

Ricky.:
Drop current database completely and then do the restore. Looks like your backup doesn't  have drop if exist clause in your backup..

PS: by DROP I mean, completely remove tables and data.

Relemar:
Solved it mate. Was something related to a duplicate key in there, took it out and it worked fine :) was 4,38 or something :D

Navigation

[0] Message Index

Go to full version