松柏
论坛版主
论坛版主
  • 铜币371枚
  • 威望39点
  • 贡献值0点
  • 社区居民
阅读:1420回复:5

今天新装了 MYSQL,发现有些表不能建了

楼主#
更多 发布于:2006-11-01 09:03
我下载的是 MySQL 5.0.27,我要建一个 project 表,死活出错,改成 projects 就没问题了,够怪。

有知道为什么的吗?
[color=#0000FF]馋嘴蜗牛[/color] 我的博客:[url]http://osnaile.osdn.cn/[/url]
0000
作家
作家
  • 铜币143枚
  • 威望34点
  • 贡献值1点
1C#
发布于:2006-11-01 17:59
Re:今天新装了 MYSQL,发现有些表不能建了
我觉得是.frm文件已经存在了的原因,也许是windows搞错了,这种问题好像只爱在win下出~
.--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/
松柏
论坛版主
论坛版主
  • 铜币371枚
  • 威望39点
  • 贡献值0点
  • 社区居民
2C#
发布于:2006-11-01 10:40
Re:今天新装了 MYSQL,发现有些表不能建了
最后把库删了再建一遍就好了。到了儿也不知道哪儿出现问题。
[color=#0000FF]馋嘴蜗牛[/color] 我的博客:[url]http://osnaile.osdn.cn/[/url]
0000
作家
作家
  • 铜币143枚
  • 威望34点
  • 贡献值1点
3C#
发布于:2006-11-01 10:13
Re:今天新装了 MYSQL,发现有些表不能建了
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.
.--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/
0000
作家
作家
  • 铜币143枚
  • 威望34点
  • 贡献值1点
4C#
发布于:2006-11-01 09:47
Re:今天新装了 MYSQL,发现有些表不能建了
MySQL - 5.0.21-Debian_3-log下
CREATE TABLE `project` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE = MYISAM ;

没问题
.--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/
0000
作家
作家
  • 铜币143枚
  • 威望34点
  • 贡献值1点
5C#
发布于:2006-11-01 09:43
Re:今天新装了 MYSQL,发现有些表不能建了
project表不是现在就存在么?。。。

难道是新关键字?不过我记得MYSQL建表时就算有关键字也可以的

CREATE TABLE `PROJECT` (
-- .......
);
.--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/
游客

返回顶部