MySQL Forums
Forum List  »  Newbie

Re: Install backup
Posted by: Rick James
Date: January 18, 2015 11:38AM

Perhaps you loaded the data twice? That is, was 148 already in the table?
Were you expecting the new INSERTs to be the same as the old? Completely different? Overlapping?

Some possible solutions:
* See INSERT IGNORE and/or REPLACE and/or INSERT ON DUPLICATE KEY UPDATE.
* See options on the dump to use REPLACE.
* TRUNCATE or DROP the table before doing the INSERT.
But understand the cause before launching into any of those solutions.

A PRIMARY KEY is a UNIQUE KEY, which implies a uniqueness constraint, which is what you hit.

Options: ReplyQuote


Subject
Written By
Posted
January 13, 2015 02:34PM
January 15, 2015 05:56PM
January 16, 2015 06:13PM
Re: Install backup
January 18, 2015 11:38AM
January 21, 2015 01:27PM
January 21, 2015 02:16PM
January 22, 2015 01:36PM
January 22, 2015 02:03PM
January 22, 2015 06:03PM


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.