Hi,
I'm moving Drupal from one server to another. I made SQL dump and now import it on the other server.
During "mysql -u user base < drupalbasedrump.sql" I have error:
ERROR 1062 (23000) at line 1821: Duplicate entry 'Я?Я┌П╬' for key 1 (or)
ERROR 1062 (23000) at line 45100: Duplicate entry 'ц░бЇц░б╟ц▒Б┌╛ц░б╣ц░бЁц░б╦ц▒б│ц▒Б─ ц▒Б┌╛ц░б╦ц▒Б┌╛ц░' for key 1
I checked table via phpmyadmin and it found some troubels:
Problems with indexes of table `node`
Warning More than one INDEX key was created for column `status`
Problems with indexes of table `nodevote`
Warning PRIMARY and INDEX keys should not both be set for column `uid`
Problems with indexes of table `term_distantparent`
Warning More than one INDEX key was created for column `tid`
Problems with indexes of table `term_node`
Warning PRIMARY and INDEX keys should not both be set for column `tid`
It there any connection between sql-import and dabase check?
WHAT SHOULD I DO TO IMPORT MY BASE NORMALLY?
Please, describe everything clear, as I'm not very familiar with sql-struture of drupal sql base.
Waiting very soon! I need to move my server... thx u.
Comments
Duplicate entry
Don't worry about the phpmyadmin index warnings.
The error suggests that there is ALREADY A ROW IN THE DATABASE that exists in that particular table with a PRIMARY KEY or FOREIGN KEY.
This suggests to me that:
-you ran the script once and stopped it in the middle and RESTARTED the script import
OR
-that you are trying to merge two different databases.
Suggested Solution:
-Try to empty the database.
-Rerun the scripts
I had to empty search*
I had to empty search* tables in the databases and the export error disappeared.
Downside of emptying search* tables?
I"m running into same problem in moving from one host to another. What was the impact of emptying your search tables?
Thanks,
Tim
Thank you, it worked
Thank you, it worked perfectly.
I run into the same issue and
I run into the same issue and solved it by just running mysqldump with option "--opt".
Regards
G
Duplicate entries in search_index
I got a similar problem with a database backup; related issue: #998474: Duplicate entries in search_index (MySQL error ERROR 1062)
as asb was appointing, in
as asb was appointing, in http://drupal.org/node/998474 they gives the key: search.
I've uninstalled the search module (uninstalled, not deactivated), which has the same fucntionality than truncating tables in phpmyadmin, and mysqldump was working again.