Mysql create table failure: ERROR 1005 (HY000): Can't create table 'lams.attendance1' (errno: 121)
2017-05-16 21:08
621 查看
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、主键名字在全数据库范围内不是唯一的
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、主键名字在全数据库范围内不是唯一的
相关文章推荐
- mysql 外键约束不能重名ERROR 1005 (HY000): Can't create table 'prize.tb_power' (errno: 121)
- Mysql 的ERROR 1005 (HY000): Can't create table 'xxx' (errno: 150)
- mysql:ERROR 1005 (HY000): Can't create table 'company.#sql-45d5_9' (errno: 150)
- MySQL错误之ERROR 1005 (HY000): Can't create table '******' (errno: 150)
- Mysql 的ERROR 1005 (HY000): Can't create table 'xxx' (errno: 150)
- SQL异常处理-Mysql ERROR 1005 (HY000): Can't create table 'tmp' (errno: 13)
- 关于MySQL创建表时Error 1005: Can't create table (errno: 121)的解决办法
- MySQL Error Number 1005 Can’t create table ‘XX.frm’ (errno: 150)
- MySQL创建外键出现 ERROR 1005: Can't create table (errno: 150)解决办法
- mysql ERROR: Error 1005: Can't create table (errno: 121)
- mysql 1005 - Can't create table 'ua_db.#sql-4124_f' (errno: 121)
- ERROR 1005 (HY000): Can't create table 'zcxt.tb_asset' (errno: 150)解决
- MySQL创建外键时错误:MySQL Error Number 1005 Can’t create table ‘XX.frm’ (errno: 150)
- mysql建表出现Error Code : 1005;Can't create table 'table' (errno: 121)
- 使用Navicat V8.0创建数据库,外键出现错误ERROR 1005: Can't create table (errno: 121)
- ERROR 1005 (HY000): Can't create table '' (errno: 150)
- ERROR 1005 (HY000): Can't create table '.\user\#sql-558_5.frm' (errno: 1
- MySQL Error Number 1005 Can’t create table ‘.\mydb\#sql-328_45.frm’ (errno: 150)
- MySQL Error Number 1005 Can’t create table ‘XX.frm’ (errno: 150)
- ERROR 1005: Can't create table (errno: 121)