Importing and replacing an edited database via phpMyAdmin

admin

Administrator
Staff member
I moved a wordpress site from one domain to another. I ran a total of 4 sql queries to replace the old domain name with the new domain name. 2 sql queries were successful and 2 were not. So, I imported the database onto my desktop and did a find and replace in notepad++. I then imported the database back via phpMyAdmin but I'm getting an error message. What am I doing wrong? Thanks

<blockquote>
Error SQL query:

--
-- Dumping data for table
Code:
wp_comments
-- INSERT INTO
Code:
wp_comments
(
Code:
comment_ID
,
Code:
comment_post_ID
,
Code:
comment_author
,
Code:
comment_author_email
,
Code:
comment_author_url
,
Code:
comment_author_IP
,
Code:
comment_date
,
Code:
comment_date_gmt
,
Code:
comment_content
,
Code:
comment_karma
,
Code:
comment_approved
,
Code:
comment_agent
,
Code:
comment_type
,
Code:
comment_parent
,
Code:
user_id
)
VALUES ( 1, 1, 'Mr WordPress', '', '<a href="http://wordpress.org/" rel="nofollow">http://wordpress.org/</a>', '',
'2013-02-01 10:33:14', '2013-02-01 10:33:14', 'Hi, this is a
comment.\nTo delete a comment, just log in and view the post&#039;s
comments. There you will have the option to edit or delete them.', 0,
'1', '', '', 0, 0 ) ;

MySQL said:

<h1>1062 - Duplicate entry '1' for key 'PRIMARY'</h1>
</blockquote>