MySQL导入数据时报错Duplicate entry 0 for key PRIMARY处理方法

http://www.gzidc.com/FrontCms/getHelpArticleShow/cat_id/114/art_id/831.html

 

MySQL导入数据时报错 Duplicate entry '0' for key 'PRIMARY'

分析原因为:主键重复,“0”主键已经存在,不能再进行添加,需要对相关参数进行调整。

解决方法:

1. 手动设置主键为自动增长:可以在数据库中手动将相关表ID设置为自增长。

posted @ 2022-07-04 17:19  yinghualeihenmei  阅读(1246)  评论(0编辑  收藏  举报