首页SEO优化网站建设趣事分享SEM教程常用代码下载网站建设模板网站设计PHP教程Premiere Pro教程建站教程网站优化JavaScript教程图集登录 / 注册

phpMyAdmin 报错:Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys

phpMyAdmin 报错:Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
故障描述
当你在使用phpMyAdmin 创建数据库表的时候,一般我们需要设置一个主键,然后让其自增长,但是有时候当你设置完成后,你可能会发现这样的错误:

1089 - Incorrect prefix key; the used key part isn’t a string, the 
used length is longer than the key part, or the storage engine doesn’t 
support unique prefix keys

图片显示如图所示: 



故障分析:

我们发现了PRIMARY KEY 那里确实多了一个4 
那么问题如何解决呢? 
难道真的要命令行去处理?当然不。

解决方案:

当设置自增长的时候,我们都会看到这个界面:



Tips: 
值得注意的是,这个大小并不是必须值,但是对phpMyAdmin不是很熟的,第一次见到很容易潜意识给设置一个值,一旦设置了就会出现上述的错误。 
所以最终的解决方案就是图中的大小这里我们只要保留空白,点击执行,然后就可以保存表成功。

评论 0

评论功能暂未开放