mysqldump restore triggers error 1062
Greetings,
I am a total MySQL newbie.
I have inherited a stone-aged RedHat 8.0 system running mysql 3.23.52 which cannot be upgraded for various reasons I won't go into here. However the powers that be are finally interested in backing this system up, so I have started looking into mysqldump. In the interests of recoverability, I have created a RedHat 9 system running mysql version 3.23.54 which I am now attempting to restore my dump file to.
So. To create my dump, I am doing this:
# mysqldump --opt --all-databases --user="root" -p > all-databases.dump
On the restore system, I do this:
# mysql -u root -p < all-databases.dump
...and it ticks along for a while and finally announces:
ERROR 1062 at line 6005: Duplicate entry '1' for key 1
Looking at line 6005, it says (line numbers added by me):
6004: LOCK TABLES groups WRITE;
6005: INSERT INTO groups VALUES (0,'Administrators'),(1,'Anonymous'),(2,'File Admin'),(3,'Company');
This does not appear to be a TINYINT problem; the table does not appear to be defined with a TINYINT.
I have googled around and the lack of an answer implies I'm doing something trivially incorrect. Can anyone point me in the right direction?
Thank you.
Subject
Views
Written By
Posted
mysqldump restore triggers error 1062
9755
April 05, 2006 11:08AM
3969
April 07, 2006 11:04PM
4244
April 10, 2006 08:57AM
4622
April 23, 2006 02:54PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.