Error 23000 Mysql Duplicate Entry
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the
Mysql Error 1062 23000 Duplicate Entry
workings and policies of this site About Us Learn more about Stack error 1062 23000 duplicate entry for key Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs
Mysql Duplicate Entry Error Code
Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; mysql error duplicate entry for key 'primary' it only takes a minute: Sign up Mysql insert query returns ERROR 1062 (23000): Duplicate entry '2147483647' for key 'PRIMARY' up vote 0 down vote favorite I've noticed an error during an insert query in my database. mysql> insert into users (name) values ('Gepp'); returned: ERROR 1062 (23000): Duplicate entry '2147483647' for key 'PRIMARY' It's the first time I mysql error duplicate entry '0' for key 'primary' get this error maybe this suggests that some kind of limit has been reached. Anyway I've checked in other posts complaining for the same error and found out that triggers may be the problem. Unfortunately it's not the case: mysql> SHOW triggers; Empty set (0.00 sec) EDIT The structure of my users table is shown below: > *************************** 1. row *************************** Field: uid Type: int(11) Null: NO Key: PRI Default: NULL Extra: auto_increment *************************** 2. row *************************** Field: name Type: varchar(50) Null: NO Key: Default: NULL Extra: *************************** 3. row *************************** Field: email Type: varchar(100) Null: NO Key: UNI Default: NULL Extra: *************************** 4. row *************************** Field: encrypted_password Type: varchar(80) Null: NO Key: Default: NULL Extra: *************************** 5. row *************************** Field: salt Type: varchar(10) Null: NO Key: Default: NULL Extra: *************************** 6. row *************************** Field: descrizione Type: varchar(600) Null: YES Key: Default: NULL Extra: *************************** 7. row *************************** Field: motto Type: varchar(100) Null: NO Key: Default: Extra: *************************** 8. row *************************** Field: status Type: varchar(100) Null: NO Key: Default: Hey new gambler! Share your thoughts! Extra:
here for a quick overview of the site Help Center Detailed answers to any questions you
Mysql Duplicate Entry For Key 1
might have Meta Discuss the workings and policies of this site mysql duplicate entry for key primary auto_increment About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or
Mysql Duplicate Entry For Key 2
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of http://stackoverflow.com/questions/18643648/mysql-insert-query-returns-error-1062-23000-duplicate-entry-2147483647-for 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error Code: 1062. Duplicate entry '1' for key 'PRIMARY' up vote 9 down vote favorite 5 I have a problem on this error message, when i try this: INSERT INTO `PROGETTO`.`UFFICIO-INFORMAZIONI` (`ID`, `viale`, `num_civico`, `data_apertura`, `data_chiusura`, `orario_apertura`, http://stackoverflow.com/questions/14628269/error-code-1062-duplicate-entry-1-for-key-primary `orario_chiusura`, `telefono`, `mail`, `web`, `Nome-paese`, `Comune`) VALUES (1, 'Viale Cogel ', '120', '2012-05-21', '2012-09-30', '08:00', '23:30', '461801243', 'informazioni@bolzano.it', 'Bolzanoturismo.it', 'Bolzano', 'BZ') Error Code: 1062. Duplicate entry '1' for key 'PRIMARY' I haven't auto_increment data, PLEASE HELP me! This is the table related, UFFICIO-INFORMAZIONI CREATE TABLE IF NOT EXISTS `PROGETTO`.`UFFICIO-INFORMAZIONI` ( `ID` INT(11) NOT NULL , `viale` VARCHAR(45) NULL , `num_civico` VARCHAR(5) NULL , `data_apertura` DATE NULL , `data_chiusura` DATE NULL , `orario_apertura` TIME NULL , `orario_chiusura` TIME NULL , `telefono` VARCHAR(15) NULL , `mail` VARCHAR(100) NULL , `web` VARCHAR(100) NULL , `Nome-paese` VARCHAR(45) NOT NULL , `Comune` CHAR(2) NOT NULL , PRIMARY KEY (`ID`) , INDEX `Nome_paese` (`Nome-paese` ASC) , INDEX `Comune` (`Comune` ASC) , CONSTRAINT `Nome_paese` FOREIGN KEY (`Nome-paese` ) REFERENCES `PROGETTO`.`PAESE` (`Nome-paese` ) ON DELETE NO ACTION ON UPDATE CASCADE, CONSTRAINT `Comune` FOREIGN KEY (`Comune` ) REFERENCES `PROGETTO`.`PAESE` (`Comune` ) ON DELETE NO ACTION ON UPDATE CASCADE) ENGINE = InnoDB INSERT INTO INSERT INTO `PROGETTO`.`UFFICIO-INFORMAZIONI` (`ID`, `viale`, `num_civico`, `data_apertu
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://dba.stackexchange.com/questions/31598/mysql-duplicate-entry-error-1062-when-restoring-backup workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from duplicate entry others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top mysql duplicate entry error 1062 when restoring backup up vote 1 down vote favorite 1 Sorry, I seen similar threads but I still couldn't mysql duplicate entry find it addressing my issue plus, I needed some more info on this. Requirement: To create an exact replica 'db4' of an existing DB 'db3'. Procedure followed: mysqldump -uuser -ppass db3 > db3.sql (size is 6G) mysql -uuser -ppass db4 < db3.sql (db4 was a newly created blank database) The 2nd step throws in the error: ERROR 1062 (23000) at line 5524: Duplicate entry '600806' for key 1" I ran the 2nd step again with --force. The restore completed but with 2 additional similar errors: ERROR 1062 (23000) at line 6309: Duplicate entry '187694' for key 1 ERROR 1062 (23000) at line 6572: Duplicate entry '1567400' for key 1 On completion when I queried certain tables of db4 database, I was able to see missing records. Question: Does this indicate a corrupted/problematic db3 database? How to proceed to create a 'consistent/working' replica (db4) of db3? If (2) fails, how to possibly troubleshoot and find the reason behind why it occurs? Thanks, mysql backup mysqldump restore mysql-5 share|improve this question edited May 16 '13 at 4:11 Yasir Arsanuk