Duplicate key on write or update? [duplicate]
Duplicate key on write or update
First i will like to acknowledge the fact that, i have been to similar posts, but i couldn't find a way to solve this annoying issue which i face as of present.I am using mysql workbench and i keep getting this error.
On workbench : ERROR: Error 1005: Can't create table 'database.path' (errno: 121)
Use "Perror 121" on command line : MySQL error code 121: Duplicate key on write or update
At the end of the log, it shows 9 successful operations and 1 failure with only path table visible in the logs.
Any help and suggestion is welcomed.I think the mysql compiler doesn't really do a good Job when it comes to signifying the actual issue for debugging.
Sorry guys, i found the problem. It is related to this post.
Which was hinted by rakeshjain.
It may be deleted as a duplicate post by admin.
The answer is, i had two CONTRAINTS on different tables with the same name:
CONSTRAINT Update_ID_fk
--> Changed one and problem solved.
Your Foreign key names must be unique