Reputation: 11297
Everytime I try restoring the dump, I get :
ERROR 1062 (23000) at line 10297: Duplicate entry 'spaß' for key 'PRIMARY'
I am trying to restore it using:
mysql -u root -ppassword database < 0719.sql
Upvotes: 2
Views: 8495
Reputation: 11
i suggest you use the source command; it will not stop on duplicates. mysql -u myuser -pmypassword
use database mydatabase; source mysqlfile.sql; exit;
Upvotes: 1
Reputation: 3620
You could import the dump into a temporary table, than use an SQL statement to copy only rows from this temporary table which do are not found in the target table.
Upvotes: 4
Reputation: 11080
you should truncate or drop the table in which you get duplicates
Upvotes: 1