使用Navicat V8.0创建数据库,外键出现错误ERROR 1005: Can't create table (errno: 121)
来源:互联网 发布:沈阳i5数控车怎样编程 编辑:程序博客网 时间:2024/06/03 14:10
ERROR 1005: Can't create table (errno: 121)
errno 121 means a duplicate key error. Probably the table already exists in the InnoDB internal data dictionary, though the .frm file for the table has been deleted. This is the most common reason for getting errno 121 in table creation. Another possible reason is a name conflict in a foreign key constraint name. Constraint names must be unique in a database, like table names are.
意思是:
1、表名重复
2、以该名字命名的表之前创建过后来删除了,但是对应的.frm文件还留在磁盘上
3、主键名字在全数据库范围内不是唯一的
今天遇到的应该是第三种情况-----主键名字在全数据库范围内不是唯一的
在设置外键的时候,外键名之前在另外一张表里面已经使用过,这就造成了'121'这个错误。将外键名进行更改后,建表成功。
- 使用Navicat V8.0创建数据库,外键出现错误ERROR 1005: Can't create table (errno: 121)
- 使用Navicat V8.0创建数据库,外键出现错误ERROR 1005: Can't create table (errno: 121)
- MySQL创建外键出现 ERROR 1005: Can't create table (errno: 150)解决办法
- MySQL 外键创建表失败 ERROR 1005 (HY000): Can't Create Table....(errno: 150)
- mysql数据库创建外键时报MySQL ERROR:1005 Can't create table (erron:150)错误
- MySQL创建外键时错误:MySQL Error Number 1005 Can’t create table ‘XX.frm’ (errno: 150)
- mysql ERROR: Error 1005: Can't create table (errno: 121)
- mysql建表出现Error Code : 1005;Can't create table 'table' (errno: 121)
- ERROR 1005: Can't create table (errno: 121)
- ERROR 1005: Can't create table (errno: 121)
- 关于MySQL创建表时Error 1005: Can't create table (errno: 121)的解决办法
- MySQL创建外键时报Can't create table (errno: 150)错误解决办法
- mysql外键关联导致的150错误(MySQL ERROR 1005: Can't create table (errno: 150))
- mysql 创建外键:ERROR 1005: Can't create table
- mysql 创建外键:ERROR 1005: Can't create table
- mysql 1005-Can't create table ''error:121&mysql error 1005 can't create table'<errno:150>
- Mysql create table failure: ERROR 1005 (HY000): Can't create table 'lams.attendance1' (errno: 121)
- mysql 外键约束不能重名ERROR 1005 (HY000): Can't create table 'prize.tb_power' (errno: 121)
- make an patch for dvrrdk demos
- jTemplates jquery数据绑定控件
- 代码之美 - 如何写出优雅的PHP代码
- Eclipse安装插件的方法和步骤
- scintilla 自动完成,参数提示
- 使用Navicat V8.0创建数据库,外键出现错误ERROR 1005: Can't create table (errno: 121)
- 虚拟运营商:互联网企业与基础电信运营商的博弈
- 变量存储
- hdu 2109
- SVN的错误:Error: Can't connect to host '': 由于目标机器积极拒绝,无法连接。
- 网络练习
- 记录点滴35(2012年的终结)
- jsp重复提交问题
- MySQL学习资源汇总