mysql中定义的1068多个主键 [英] 1068 multiple primary key defined in mysql

查看:199
本文介绍了mysql中定义的1068多个主键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我导出(带有更新)我现有的My SQL备份,并通过PHPAdmin将其导入到另一台PC,但是它显示以下错误消息.我只需要替换备份PC上的现有数据库即可.可以这样做吗?

I export (with Update) my existing My SQL backup and import it to another PC via PHPAdmin but it gives below error message. I need to just replace existing database on backup PC. Is it possible to do this?

#1068-定义了多个主键"

"#1068 - Multiple primary key defined"

谢谢, 莫汉K

推荐答案

是的,在导出中添加drop table选项,然后在导入时,将删除并重新创建表.这样可以避免pk冲突.

Yes, add drop table option in your export, then on import, your table will be dropped and recreated. This will avoid pk conflicts.

这篇关于mysql中定义的1068多个主键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆