I have a Drupal site that I'm transferring to another host. I've exported my (large) databse, and am in the process of trying ot import the DB into teh new host. While I am importing a keep getting this error:

SQL query:

INSERT INTO `search_total`
VALUES (
'engstrom', 0.30103
);

MySQL said: Documentation
#1062 - Duplicate entry 'engstrom' for key 1

What I've been doing so far is just searching for and deleting the offending line. But then on the next attempt at an import, I just get the same error but a new word. I'm wondering if I am going about this the right way?

Comments

pragna’s picture

you have to use mysql command for import - export bcz size of the db is very large

For Import use :-
mysqldump

For Export use :-
mysql

Pragna J Bhalsod

AppleBag’s picture

For anyone who may stumble across this in a search in the future, the way I resolved this was to make the backup in PhPMyAdmin (uncompressed) with all drop tables, and then had to import it via command line using mysql itself.

Trying to import the .sql using the dump from the command line mysql (using either the --opt flag or not) still spit up errors, using the import functions of either PhpMyadmin or the commandline. So for some reaosn the PhpMyadmin dump/commandline import combo worked w/out issues.

Thanks Pragma for the commandline suggestion.