On Thu, Apr 5, 2012 at 4:59 AM, Roger arelem@bigpond.com wrote:
Using Drupal 7.12 I'm building a live site and wish to duplicate the database. I used phpmyadmin to copy the database on the server and cpanel to download to my pc.
IMO, phpmyadmin is the wrong thing to use for Drupal DB due to size. I tend to use mysqldump -uname -pword database > mysite.sqldump.
I keep running into an error: ERROR 1062 (23000) at line 27: Duplicate entry 'comment_publish_action' for key 'PRIMARY'
Makes you wonder how the data was entered into the DB doesn't it? :D Was there a primary key on the original DB table? You could try dropping the PRIMARY key declaration in the dumped file (i.e. mysite.sqldump) before you import it and then try adding a PRIMARY key after the data is imported.