How to resolve the MySQL error Duplicate entry 'comment_publish_action' for key 'PRIMARY'? I'm a beginner in Drupal. I want to import my database to my webserver and get this error when trying to do so:


  "#1062 - Duplicate entry 'comment_publish_action' for key 'PRIMARY'"


I don't know how to fix this error.

Here are more details about it:


  INSERT INTO actions (aid, type, callback, parameters,
  label) VALUES ('comment_publish_action', 'comment',
  'comment_publish_action', '', 'Publish comment'),
  ('comment_save_action', 'comment', 'comment_save_action', '', 'Save
  comment'), ('comment_unpublish_action', 'comment',
  'comment_unpublish_action', '', 'Unpublish comment'),
  ('node_make_sticky_action', 'node', 'node_make_sticky_action', '',
  'Make content sticky'), ('node_make_unsticky_action', 'node',
  'node_make_unsticky_action', '', 'Make content unsticky'),
  ('node_promote_action', 'node', 'node_promote_action', '', 'Promote
  content to front page'), ('node_publish_action', 'node',
  'node_publish_action', '', 'Publish content'), ('node_save_action',
  'node', 'node_save_action', '', 'Save content'),
  ('node_unpromote_action', 'node', 'node_unpromote_action', '', 'Remove
  content from front page'), ('node_unpublish_action', 'node',
  'node_unpublish_action', '', 'Unpub[...]
From the information provided in the question so far, it is hard to tell what is causing your problem (consider refining your question by editing it).

However, as an alternative, you may want to consider using the Backup and Migrate module like so:


install that module on both Drupal sites (where you want to export from, and where you want to import to).
use this module to create a backup in the originating Drupal site (and save it somewhere to a local file), of the relevant tables in the MySQL database.
use this module to restore that "local file" (= backup) to import it in your target site (which is where you're currently encountering the problem.


Does this help somehow?