我将wordpress网站从一个域移到另一个域。我总共运行了4个sql查询,用新的域名替换旧的域名。 2个sql查询成功,2个不成功。所以,我将数据库导入到我的桌面上,并在记事本++中进行查找和替换。然后我通过phpMyAdmin将数据库导入,但是收到错误消息。我究竟做错了什么?由于通过phpMyAdmin导入和替换已编辑的数据库
错误SQL查询:
- - 为表
wp_comments
倾销数据 - INSERT INTOwp_comments
(comment_ID
,comment_post_ID
,comment_author
,comment_author_email
,comment_author_url
,comment_author_IP
,comment_date
,comment_date_gmt
,comment_content
,comment_karma
,comment_approved
,comment_agent
,comment_type
,(1,1,'WordPress先生','','http://wordpress.org/','', '2013-02-01 10:33:14','2013-02-01 10:33: 14' ,“嗨,这是一个 评论。\ n要删除一条评论,只要登录系统,查看这篇文章'小号 意见。您可以选择编辑或删除它们。',0, '1','','',0,0);MySQL表示:
1062 - 重复录入“1”键“PRIMARY”
我只替代两个entires,在桌下的“选项”有1项第1页和第二页上的1项。 – 2013-03-14 14:39:44
看起来像是有一个与您试图插入的主键相同的条目 – 2013-03-14 14:40:14