问题描述
首先,我想承认一个事实,我去过类似的帖子,但是我找不到解决目前所面临的烦人问题的方法.我正在使用 mysql工作台,我一直收到此错误.
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.
-
在工作台上:错误:错误1005:无法创建表'database.path'(errno:121)
On workbench : ERROR: Error 1005: Can't create table 'database.path' (errno: 121)
在命令行上使用"Perror 121": MySQL错误代码121:在写入或更新时出现重复键
Use "Perror 121" on command line : MySQL error code 121: Duplicate key on write or update
在日志末尾,它显示 9个成功的操作和 1个失败,并且在日志中仅显示 path 表.
At the end of the log, it shows 9 successful operations and 1 failure with only path table visible in the logs.
欢迎任何帮助和建议.我认为当涉及到表示调试的实际问题时,mysql编译器并不能很好地完成工作.
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.
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
->更改了一项并解决了问题.
CONSTRAINT Update_ID_fk
--> Changed one and problem solved.
这篇关于重复写入或更新密钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!