phpMyAdmin: MySQL Error 1062 - Duplicate entry -


i connect user "root" onto database "test" host locally development. among others have table "ratingcomment". reason when click on table "ratingcomment" phpmyadmin shows me following error:

fehler      sql-befehl:       insert  `phpmyadmin`.`pma_history` (      `username` ,      `db` ,      `table` ,      `timevalue` ,      `sqlquery`     )     values (     'root',  'test',  'ratingcomment', now( ) ,  'select * `ratingcomment`'     )     mysql meldet:       #1062 - duplicate entry '838' key 'primary' 

i used google finde out following

"this indicates have unique or primary index on table, , there duplicate value on 1 of values in 1 of these indexes." 

but still dont quite understand error! use primary key, auto-increments of tables, there shouldnt problem table. had table named "rating" had column "comment". can be, causes problems?

quick fix:

repair table `phpmyadmin`.`pma_history` 

if fails, i'd truncate/empty table.

truncate table `phpmyadmin`.`pma_history` 

although phpmyadmin has it's place in toolbox, don't use it's internal db.

addendum

myisam tables can become corrupted. couple causes hit me: if mysql not shutdown properly, or if table has fulltext index , stopword file on disk had changed.

simply stated, repair checkes data file errors (and depending on options, makes usable again) , rewrites index file. fair warning: myisam, repairing table can toast data in table make usable. see doc more details.

a google search pertaining pma table being corrupted lead me this.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -