我希望能够全局替换Wordpress MySQL数据库中站点URL的所有实例为新的站点URL。为了做到这一点,我使用phpMyAdmin将数据库导出为.sql文件,然后在文本编辑器中进行全局替换,最后再使用phpMyAdmin导入.sql文件。
在导入过程中,我遇到了一个主键重复输入错误。为了调试此问题,我导出了该文件,然后导入了完全相同的文件,没有进行任何更改,但仍然遇到了相同的错误。
非常感谢您提供的任何帮助来解决这个问题。
在导入过程中,我遇到了一个主键重复输入错误。为了调试此问题,我导出了该文件,然后导入了完全相同的文件,没有进行任何更改,但仍然遇到了相同的错误。
非常感谢您提供的任何帮助来解决这个问题。
--
-- Dumping data for table `wp_comments`
--
INSERT INTO `wp_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`, `comment_parent`, `user_id`)
VALUES (1, 1, 'Mr WordPress', ''
,'http://wordpress.org/', '', '2011-04-28 00:49:55', '2011-04-28 00:49:55'
,'Hi, this is a comment.<br />To delete a comment,
just log in and view the post's comments.
There you will have the option to edit or delete them.'
, 0, 'post-trashed', '', '', 0, 0 ) ;
MySQL said:
#1062 - Duplicate entry '1' for key 'PRIMARY'