Mysql create table failure: ERROR 1005 (HY000): Can't create table 'lams.attendance1' (errno: 121)

来源:互联网 发布:怎么能开淘宝店铺 编辑:程序博客网 时间:2024/05/21 00:48

ERROR 1005 (HY000): Can't create table 'lams.attendance1' (errno: 121)


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、主键名字在全数据库范围内不是唯一的



阅读全文
0 0
原创粉丝点击